Jump to content

Change active document

Recommended Posts

Is there a way for changing the active document?


Most functions in the SDK are based on the current active drawing. I want to create a function which needs handles to some specific different files and I have to switch between them often. Calling "OpenDocumentPath" opens a document and sets the document to the active document. Doing this again will change the document either. But how will I come back to the "older" document? I tried to save handles to both document header objects, but this wont work proper. I can request the active document with "GetActiveDocument" but I cannot find a function like "SetActiveDocument" and using "OpenDocumentPath" again also don't work. Also the object VWDocument doesn't look usable (There is a typo in the function name either) and I cannot pass a handle or IFileIdentifierPtr. 


What can I do, I have no idea?

Share this post

Link to post

That could be problematic for a number of reasons — if you can accomplish what you want with references or file sharing, that would be the way to go.  Also, resources in other files are accessible without opening the other file, and you can export a resource back to the original file with the SDK, so if you structure your files to use symbols, that could be a way to accomplish what you need.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

  • Create New...