Skip to content

Instantly share code, notes, and snippets.

View ricaun's full-sized avatar

Luiz Henrique Cassettari ricaun

View GitHub Profile
@ricaun
ricaun / AsyncExternalEventHandler.cs
Created July 24, 2024 14:07
Simple Async ExternalEventHandler for Revit API
using Autodesk.Revit.UI;
using System;
using System.Threading.Tasks;
public class AsyncExternalEventHandler : IExternalEventHandler
{
private readonly Action<UIApplication> execute;
private readonly ExternalEvent externalEvent;
private TaskCompletionSource<bool> eventCompleted;
public AsyncExternalEventHandler(Action<UIApplication> execute)
@ricaun
ricaun / code.cmd
Created April 4, 2024 14:03
File to use in Revit 2025 to force Macro Manager to open csproj file with your IDE.
@echo off
REM Navigate to the specified directory
cd /d "%~1"
REM Loop through all .csproj files and open them
for %%f in (*.csproj) do (
start "" "%%~f"
)
@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