Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I can't seem to find a way to get the UIApplication in a Sharp Macro.
Is the UIApplication not available in a Macro?
And if so, does that mean PostCommand cannot be run from a Macro?
I'm still pretty much a beginner, so it may be missing something simple. Here is what I've tired:
public void PcmdMacro()
{
UIDocument uidoc = this.ActiveUIDocument;
Document doc = this.ActiveUIDocument.Document;
UIApplication uiapp = ??;
RevitCommandId id = RevitCommandId.LookupPostableCommandId(PostableCommand.ViewRange);
uiapp.PostCommand( id );
}
Solved! Go to Solution.