Hello,
I am trying to run existing commands like Measure or Snap from my custom .NET function. After executing fuction according to their ID nothing happend. So i tried another existing function and find out some strange behaviour.
Trying to run “FillSelected” to zoom in all selected component. Using code below and all works.
ICommandRegistry cmd = IoC.Get<ICommandRegistry>();
IActionItem extractCmd = cmd.FindItem("FillSelected");
extractCmd.Execute();
But when trying to run very similar fucntion “FillWorld” with same code, nothing happend and seems like function dont work.
My final goal is make working the Snap function to use it in my custom function. Also trying to run Snap or Measure with code below and still dont work.
ICommandRegistry cmd = IoC.Get<ICommandRegistry>();
ICommandPanelAction commandPanelAction = IoC.Get<ICommandPanelAction>();
IActionItem extractCmd = cmd.FindItem("SnapPrimitiveCommand"); (or "Measure")
cmd.StartCommandPanelAction(extractCmd, commandPanelAction);
commandPanelAction.StartAction();
extractCmd.Execute();
Anyone meet this problem, or know the right way to start these types of function?
Thank you