Jump to content
Developer Wiki and Function Reference Links ×

Change active document


Runtemund

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?

Link to comment

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.

Link to comment

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.

Guest
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.

×
×
  • Create New...