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

What you've run into isn't a change from VBA to C# but is a change that was made in the API quite a while ago.  The StartCommand method has been retired.  You can still accomplish the same thing by first getting the CommandDefinition that represents the command and then executing it.  Below os some sample code that demonstrates what you're trying to do.

 

string filename = "C:/Temp/Tests/EllipsePart.ipt";

// Post the filename to the private event queue. 
invApp.CommandManager.PostPrivateEvent(Inventor.PrivateEventTypeEnum.kFileNameEvent, filename);

// Get the control definition for the Place Component command.
Inventor.ControlDefinition ctrlDef = invApp.CommandManager.ControlDefinitions["AssemblyPlaceComponentCmd"];

// Execute the command. 
ctrlDef.Execute();

Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog