• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Valued Contributor
    Posts: 51
    Registered: ‎07-07-2004

    Temporary Document and Database

    120 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

    Please use plain text.
    Valued Contributor
    Posts: 51
    Registered: ‎07-07-2004

    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

    Please use plain text.
    Valued Mentor
    Posts: 308
    Registered: ‎05-06-2012

    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.

    Please use plain text.