I am writing a program that allows users to trigger events in creo from an external application. I am having difficulty, however, getting a pointer to the Creo session to execute the actions.
For example, after a user clicks on the button to create a new part, I am able to get a pointer to the session object using pfcGetProESession(), but when I try to call OpenFile() I get an AccessViolation error.
When I run these same commands after clicking on a button from Creo, however, it works.
Is there a command I need to call to allow me to use the Creo session when triggered by an outside event?