Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
frederic.vandenplas
in reply to: Anonymous

 Hi,

 

You can send extra information to a command (if you see it as a selectionset before activating a command)

This page explains alot about the commandmanager

http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html

And you need something like this

Public Sub PlacePart() 
    ' Get the command manager. 
    Dim oCommandMgr As CommandManager 
    Set oCommandMgr = ThisApplication.CommandManager 

    ' Post the filename. 
    Call oCommandMgr.PostPrivateEvent(kFileNameEvent, _ 
         "C:\Users\ekinsb\Documents\Inventor 2010\Showcasetest.ipt") 

    ' Get control definition for the place component command. 
    Dim oControlDef As ControlDefinition 
    Set oControlDef = oCommandMgr.ControlDefinitions.Item( _  
                                    "AssemblyPlaceComponentCmd")  

    ' Execute the command. 
    Call oControlDef.Execute 
End Sub
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"