I am trying to write an API that requires to trigger the pick new command.
RevitCommandId RCID = RevitCommandId.LookupCommandId("Dialog_Family_FamInstGridDbar:Control_Family_PickHost");
uiapp.PostCommand(RCID);
However, when I try the code below. I get an error saying:
Revit encountered a Autodesk. Revit Exceptions.ArgumentException: The commandld must be in Autodesk.Revit.UI.PostabIeCommand or an external
command.Parameter name: commandld at Autodesk. Revit U U Application.PostCommand(RevitCommandId commandld)
Is there any reason why I can't do this?