Ribbon Commands Within A Rule

Ribbon Commands Within A Rule

Anonymous
Not applicable
477 Views
2 Replies
Message 1 of 3

Ribbon Commands Within A Rule

Anonymous
Not applicable

Hi All,

 

I'm looking to access commands found in the Inventor Ribbon using iLogic/API.  (for example; I want to be able to open the "Create Base View" dialog box in a drawing by running a rule.)  If anyone could point me in the right direction, I would appreciate it.

 

Thanks

 

 

 

0 Likes
Accepted solutions (1)
478 Views
2 Replies
Replies (2)
Message 2 of 3

Sergio.D.Suárez
Mentor
Mentor
Accepted solution

Hello, with this command activates the display of the center of gravity in a part or assembly.
for example

Dim oCommandMgr As CommandManager 
oCommandMgr = ThisApplication.CommandManager 

' Get control definition for the line command. 
Dim oControlDef As ControlDefinition 
 oControlDef = oCommandMgr.ControlDefinitions.Item("AppCenterOfGravityCmd")  
' Execute the command. 
oControlDef.Execute

In drawing file, with this command create a base view.
Differentiate the commands execute and execute2 (True), the second I use when I am in the middle of a pre-programming line, I want to execute the punctual command, and then I want to continue in the program line performing another action.

 

Dim oCommandMgr As CommandManager 
oCommandMgr = ThisApplication.CommandManager 

' Get control definition for the line command. 
Dim oControlDef As ControlDefinition 
 oControlDef = oCommandMgr.ControlDefinitions.Item("DrawingBaseViewCmd")  
' Execute the command. 
oControlDef.Execute2(True)

 

You see more information of this commands here

https://spiderinnet2.typepad.com/blog/2012/07/inventor-net-find-all-the-control-definitions-1.html


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you so much.  That can opens a lot of doors for me!

0 Likes