Skip to content

Instantly share code, notes, and snippets.

View ricaun's full-sized avatar

Luiz Henrique Cassettari ricaun

View GitHub Profile
@ricaun
ricaun / ricaun.RevitInContext.cs
Last active January 19, 2025 16:09
Revit API in context implementation.
bool InContext(UIApplication application)
{
try
{
void Application_Idling(object sender, Autodesk.Revit.UI.Events.IdlingEventArgs e) { }
application.Idling += Application_Idling;
application.Idling -= Application_Idling;
return true;
}
catch { } // Invalid call to Revit API! Revit is currently not within an API context.
@ricaun
ricaun / netcore.csproj
Created January 9, 2024 19:45
Revit 2025 - .NET Core
<!-- Net Core -->
<PropertyGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<EnableDynamicLoading>true</EnableDynamicLoading>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<GenerateDependencyFile>false</GenerateDependencyFile>
</PropertyGroup>
@ricaun
ricaun / PrintValues
Created July 11, 2022 22:14 — forked from esfand/PrintValues
MSBuild Property Demo
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"
DefaultTargets="PrintValues"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Add>$([MSBuild]::Add(5,9))</Add>
<Subtract01>$([MSBuild]::Subtract(90,768))</Subtract01>
<Mult01>$([MSBuild]::Multiply(4,9))</Mult01>
<Div01>$([MSBuild]::Divide(100,5.2))</Div01>
@ricaun
ricaun / Blink.ino.with_bootloader.standard.bat
Last active April 6, 2023 13:47
Upload atmega328p firmware using avrdude and usbasp