Call 3D Grips command

Call 3D Grips command

fakeru
Advocate Advocate
374 Views
4 Replies
Message 1 of 5

Call 3D Grips command

fakeru
Advocate
Advocate

Is it possible to call 3D Grips command with VBA?

Untitled.png

Autodesk Inventor 2015 Certified Professional
0 Likes
375 Views
4 Replies
Replies (4)
Message 2 of 5

bobvdd
Alumni
Alumni

I cannot directly find the command associated with 3D Grip (I am not even sure that there is any exposed through the API)

But why don't you use the "Direct Edit" command instead which does what 3D Grip does and much more.

 

Public Sub RunDirectEditCommand()
    ' Get the CommandManager object.
    Dim oCommandMgr As CommandManager
    Set oCommandMgr = ThisApplication.CommandManager
    
    ' Get control definition for the Direct edit command.
    Dim oControlDef As ControlDefinition
    Set oControlDef = oCommandMgr.ControlDefinitions.Item("PartDirectCmd")
                                                                                   
    ' Execute the command.
    Call oControlDef.Execute
End Sub

 

Cheers

Bob




Bob Van der Donck


Principal UX designer DMG group
0 Likes
Message 3 of 5

fakeru
Advocate
Advocate

I need this in context of medium to large assemblies and then the direct edit commands are very slow... 

Autodesk Inventor 2015 Certified Professional
0 Likes
Message 4 of 5

bobvdd
Alumni
Alumni

If you open the part document in a new window, performance should not mtter that much but it might hamper a more seamless flow of the app.

 

Bob




Bob Van der Donck


Principal UX designer DMG group
0 Likes
Message 5 of 5

fakeru
Advocate
Advocate

You are right, but such the meaning of the addin I'm working on that it must call the command in assembly enviroment. And usually it will happen in large assemblies.

 

 

Autodesk Inventor 2015 Certified Professional
0 Likes