By Barbara Han
been reported to My user often clicks my custom command in the sketch context, but my custom command doesn't work in the sketch context, how can I programmatically exit the sketch context to the part environment?
Running ‘AppReturnTopCmd’ or ‘AppReturnParentCmd’ command through Inventor API can exit the sketch context. Please refer to below sample code snippet:
' Inventor application object.
Private m_inApp As Inventor.Application
If m_inApp.UserInterfaceManager.ActiveEnvironment.InternalName =
Execute() 'or AppReturnParentCmd