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

Hi,

in case you didn't know there is a programing/API-help inside inventor.

You can get to it by opening the dropdown menu next to the question mark in the upper right corner of inventor.

Then you select "help" -> "programing/API-help".

 

When you search for "postprivateevent" you get more information about the method.

 

"Method that posts data onto Autodesk Inventor's internal clipboard. Certain commands that usually obtain information using a dialog, i.e. Open, Save, etc., look first to see if data is on the clipboard before displaying the dialog. If valid information is on the clipboard the command will use it instead of displaying the dialog and asking the user to specify the filename."

 

So basically you post all the required data for the save command to the internal clipboard and then call the save command.

 

Which also helped me a lot to better understand the internal mechanisms of the api is the macro/vba environment (hit Alt+F11 in inventor).

In case you don't know, here is how I do it.

Open the VBA environment with ALT+F11. Create a new modul and insert the following code:

Sub Dokument()
    Dim Dok
    Set Dok = ThisApplication
End Sub

Then click left to "End" so a red dot appears and the line is also highlighted in red.

Right click on "ThisApplication" and add a monitoring (I'm not sure which word is the correct translation)

Ok the window poping up and keep the new bigger "monitoring" window open.

Then hit F5 to start. 

Now you can browse the internal tree of inventor in the monitoring window.

Hopefully you could understand what I was trying to explain :face_with_tongue:

VBA-1.pngVBA-2.png