Skip to content

Instantly share code, notes, and snippets.

@ricaun
Created January 19, 2025 16:11
Show Gist options
  • Save ricaun/a491da0efa658664c62a9b21a7e75dba to your computer and use it in GitHub Desktop.
Save ricaun/a491da0efa658664c62a9b21a7e75dba to your computer and use it in GitHub Desktop.
Revit API in AddIn context implementation.
bool InAddInContext(UIApplication application)
{
// ActiveAddInId is null when invoke outside Revit Api context.
return application.ActiveAddInId is not null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment