.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Temporary Document and Database

2 REPLIES 2
Reply
Message 1 of 3
mbujak
381 Views, 2 Replies

Temporary Document and Database

I have a preview control on a window that I want to disply temporary custom entities that the user can build before adding to the current working document. Is there a way to create a temporary document and database that I can show in my preview control? The PreviewControl was created with the guidance of the BlockView.net sample.

 

What I mean by temporary, is a document / database that cannot be displyed or edited in the editor window.

 

Any suggestions?

 

Mike B

2 REPLIES 2
Message 2 of 3
mbujak
in reply to: mbujak

Well, it appears I can use an "in-memory" database without a problem, but the strange thing is that the Model needs to be created using GraphicsManager from a Document in order for it to be hooked up to the graphics system for rendering.

 

Is there any other way of getting the Model object hooked up to the graphics system?

 

Regards,

 

Mike

Message 3 of 3
DiningPhilosopher
in reply to: mbujak

If the second argument to the Database() constructor is false, the database is associated with the Document that was active at the point when the constructor was called, and you should be able to use that Document's GraphicsManager. That same document must be active in order for graphics to correctly update. If you are using some modeless UI then you should probably use a different Database for each open document, and use the one associated with the currently active document.

 

You can call DocumentCollection.GetDocument() to get the associated document for a database.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost