Jump to content
Developer Wiki and Function Reference Links Read more... ×
Runtemund

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×