This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ricaun.Revit.UI; | |
using System; | |
namespace RevitAddin.ToolTipVideo.Revit; | |
public static class RibbonToolTipExtension | |
{ | |
public static IRibbonItem SetTooltipVideo<IRibbonItem>(this IRibbonItem ribbonItem, string videoPath, | |
string title = null, | |
string toolTip = null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Autodesk.Revit.UI; | |
using System; | |
using UIFramework; | |
namespace RevitTest.UIDocument.Tests | |
{ | |
///<summary> | |
/// Provides extension methods for closing UI documents in the Revit application. | |
/// </summary> | |
public static class UIDocumentCloseExtension |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool InAddInContext(UIApplication application) | |
{ | |
// ActiveAddInId is null when invoke outside Revit Api context. | |
return application.ActiveAddInId is not null; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Autodesk.Revit.UI; | |
using ricaun.Revit.UI; | |
namespace RevitAddin.Forum.Revit | |
{ | |
[AppLoader] | |
public class AppScale : IExternalApplication | |
{ | |
private RibbonPanel ribbonPanel; | |
public Result OnStartup(UIControlledApplication application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Net Core --> | |
<PropertyGroup Condition="!$(TargetFramework.StartsWith('net4'))"> | |
<EnableDynamicLoading>true</EnableDynamicLoading> | |
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | |
<GenerateDependencyFile>false</GenerateDependencyFile> | |
</PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avr\bin\avrdude | |
avr\bin\avrdude -C avr\etc\avrdude.conf -c usbasp -p atmega328p -U flash:w:"Blink.ino.with_bootloader.standard.hex":i -v | |
@pause |