1

I have an iLogic rule tied to an Event Trigger in an Inventor drawing. The rule contains the following line of code;

Call ThisApplication.CommandManager.ControlDefinitions.Item("DrawingArrangeDimensionsCmd").Execute()

While the above line works fine in Inventor Desktop, it is causing a failure in Inventor Design Automation. I have isolated the issue to this line because if this line is commented out, the rule runs fine in IDA.

The purpose of the above line of code is to call the "Arrange Dimensions" command. I suspect perhaps that calling commands is not allowed in IDA, but need to confirm.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Ryan Small
  • 11
  • 1
  • Please format your code block(s), in order to make your question more readable, and receive better quality answers. Take a look on this link (https://meta.stackoverflow.com/questions/251361/how-do-i-format-my-code-blocks) for more information. – Mario Mateaș Feb 15 '23 at 04:31

1 Answers1

1

Avoid to use direct command execution on DA. Use appropriate method from API instead.

In this case it is a method DrawingDimensions.Arrange Method

Michael Navara
  • 1,111
  • 2
  • 8
  • 13