Capturing SaveAs event in Inventor 2011

Capturing SaveAs event in Inventor 2011

Anonymous
Not applicable
468 Views
3 Replies
Message 1 of 4

Capturing SaveAs event in Inventor 2011

Anonymous
Not applicable

I have addin running inside Inventor. The requirement is that addin should be able to capture the "save as" operation done by the user. Internally, addin stores unique information in the active Inventor file and when user does "Save as", it needs to generate and store the new unique information in the newly created file after SaveAs. That is the reason it is required to capture the SaveAs event.

 

It was possible to capture the "Save" event and there I get EventTimingEnum (kBefore and kAfter). But the filename is same for kBefore and kAfter. So its not possible to identify that its SaveAs operation.

 

Any pointers would really help.

 

Thanks in advance.

0 Likes
469 Views
3 Replies
Replies (3)
Message 2 of 4

psaarloos
Collaborator
Collaborator
Hi,

You should look into the 'context' of the OnSave event. In the Inventor SDK there is a tool which can help you to see what's in this context information. ((C:\Users\Public\Public Document\Autodesk\Inventor 2011\SDK). First start Inventor, then start the EventWatcher.exe from the SDK Tools folder. Select the events you want to watch and then perform your SaveAs action on Inventor. Go back to the eventwatcher to look what's inside the context information...

Hope this points you in the right direction!

Regards,
Pim
Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi Pim,

 

Thanks a lot for your reply. Your suggestion helped and I was able to get the required information from the 'context' which is actually Inventor.NameValueMap passed to the event handler.

 

Appreciate your help.

 

Thanks and Regards.

0 Likes
Message 4 of 4

Raider_71
Collaborator
Collaborator

Hi I am having the same issue. Can you point me in the right direction regarding the name valuemap option to get arround the issue of doing a saveas where it then still uses the previous filename?

 

If you have a sample that would be great! I am trying to save a PDF of every idw that is saved. I have created the addin and it works great until I try and do a Save As.

 

Thanks in advance!

 

Pieter

0 Likes