Dears,
What I want to achieve:
I would like to modify Inventor's file properties just after Vault's state change has been done on that file.
It shall work from any Valut's client.
Thus I have created IWebServiceExtension which catches this state change and by Apprentice modifies file's properties.
Problem:
This works fine when state is changed in Vault Client but it doesn't work when it is done in Inventor's Vault add-in.
It is because apprentice is executed within Inventor process.
According to the discussion in apprentice-error-run-time-error-91
it is not possible to use Apprentice inside Inventor process.
Possible solution:
I could use current Inventor instance which has open file to change its properties but I don't know how to get Inventor instance inside IWebServiceExtension.
My code is executed in Inventor process but I can't figure out how to get Inventor.Application object.
I don't know if it is possible.
I would like to avoid to use Marshal.GetActiveObject("Inventor.Application") since in case there will be more than one Inventor instance opened i can get into troubles.
Any help would be appreciated.
Best regards,
Kamil