How to Transfer objects from Layout to Model?

Discussion in 'AutoCAD' started by Stanley, Jan 7, 2005.

  1. Stanley

    Stanley Guest

    Hello everybody,

    Let me explain my problem here and wish someone can give some advice about
    it.

    I make use of Autocad's layout features very often, usually I have about 20
    layout pages and each page contains up to 6 viewports in my drawing.

    Dimensions / Title Blocks and some other Texts or Marks were all placed on
    PaperSpace.

    Now I need to transfer every Layout Page into the ModelSpace and save it as
    separate drawing files.

    The most important thing is to retain the same layout structure, but things
    in each viewport must be extracted as entities and placed

    into ModelSpace.

    Thanks for help.

    Best regards.

    Stanley.
     
    Stanley, Jan 7, 2005
    #1
  2. Stanley

    HJohn Guest

    I am not sure if you can accomplish this at all, in an efficient way, but it would be very interesting to see if you can find a way. There is no method to add entities to the model space without providing required parameters, so you would have to create an entity reference (variable) for each entity you have in PS and store their properties. You could then add them to MS, but you still have to figure out the coordinate system relationship between MS and PS. After, you could delete everything from PS. Good luck.
     
    HJohn, Jan 7, 2005
    #2
  3. Stanley

    Stanley Guest

    Hello John,

    Thanks for your advice.

    Actually I'm using VBA routine to do the job. The result is acceptable but
    slow & seems a bit complex.

    My procedures are as follow:
    1. Create a new document by VBA code first.
    2. Collect all Viewport objects on the LayoutPage.
    3. For each Viewport, Get it's Center & Boundary in PS coordinate.
    Translate the Center &
    Boundary coordinate into MS world coordinate.
    Use the translated coordinate as a window for selecting objects
    within the Viewport in MS.
    4. Copy selected objects from Current Drawing to the New Document.
    Move Objects from translated WCS of Viewport's center to the
    Viewport's center in PS coordinate.
    So that the layout structure can be retained.
    5. After all Viewports were processed. Collect all entities on
    LayoutPage's PS (except Viewport objects)
    and copy them to the New Document also.

    The above procedures have been written in VBA and works.
    The problem is how to clip the objects that crossed by the Viewport
    boundary?
    Hope someone can provide a more simple & efficent way to do that.
     
    Stanley, Jan 8, 2005
    #3
  4. Stanley

    krispy Guest

    Have you looked at using the express tools command CHSPACE which moves objects from paperspace to modelspace and vice versa?
     
    krispy, Jan 9, 2005
    #4
  5. Stanley

    Stanley Guest

    Is it available and works with AutoCad2004?
     
    Stanley, Jan 10, 2005
    #5
  6. Stanley

    Matt W Guest

    It's part of the Express Tools and yes, it's available in 2004.
     
    Matt W, Jan 10, 2005
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.