.NET

Reply
Valued Contributor
mbujak
Posts: 53
Registered: ‎07-07-2004
Message 1 of 3 (152 Views)

Temporary Document and Database

152 Views, 2 Replies
10-18-2012 05:51 AM

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

Valued Contributor
mbujak
Posts: 53
Registered: ‎07-07-2004
Message 2 of 3 (129 Views)

Re: Temporary Document and Database

10-18-2012 01:46 PM 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

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 3 of 3 (104 Views)

Re: Temporary Document and Database

10-21-2012 09:41 PM 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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community