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

Hi @442780782.  That overall code example above does not really appear to be document type specific.  But the task it is doing could be done in a simpler way, using much less code.  What are you currently trying to do?

If the title of this topic is what caught your attention, then you may like the following vb.net code property:

Microsoft.VisualBasic.FileIO.FileSystem.CurrentDirectory 

It is a Read/Write property with a String type value representing a system-wide environment variable.

Also, in the Inventor API, we have this method that we can use for 'posting' things like file names, Strings, Booleans, and such to accompany command execution calls.

CommandManager.PostPrivateEvent (ThisApplication.CommandManager.PostPrivateEvent)

It will post (or send) some data up into Inventor's session memory, similar to the clipboard method being used in the example above, but scoped to Inventor's internal clipboard, instead of the whole operating system's clipboard.  It has a companion method also, for clearing such data, when needed.

CommandManager.ClearPrivateEvents 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)