Hi all,
It is 2020 and I am using Revit 2020.
Does anyone know the workaround to this issue?
As far as my understanding goes, PostCommands can be used to activate commands by the RevitCommandId found by either using the LookupCommandId or LookupPostableCommandId Method
As said by @Anonymous , no commands related to exploding a DWG or CAD is available in the PostableCommand Enumeration and thus I cannot use the LookupPostableCommandId
By looking at the Revit journal as inspired by Mr. Tammik's post: Programmatic Custom Add-In External Command Launch, the closest I would get to the explode button is "Dialog_Essentials_ImportInstanceExplode" which I thought must be the command name for the Explode command. However, implementing the following code returns an argument exception saying that: 'The commandId must be in Autodesk.Revit.UI.PostableCommand or an external command.'
UIApplication uiapp = commandData.Application;
UIDocument uidoc = uiapp.ActiveUIDocument;
Document doc = uidoc.Document;
uiapp.PostCommand(RevitCommandId.LookupCommandId("Dialog_Essentials_ImportInstanceExplode"));
As for the voting to the Revit Idea Station, the wish was raised previously but due to inadequate number of support from the community, the wish was not pursued and the post was since archived.
Should I go back to UI automation? or does anyone know the command name or Id required for the explode command?
Thank you