3d to 2d

Discussion in 'AutoCAD' started by perriwinkle, Dec 20, 2004.

  1. perriwinkle

    perriwinkle Guest

    Just received an unbelievable number of files that were originally created in (I think) architectural desktop... can't tell because they are saved in autoCAD 2000 format. I need to convert the 3d portions of them to 2d (and I really need it to be something I can batch process) The story of everyone's lives, no time, less budget, huge expectations... Anyway, I have been looking through post and found some interesting ideas, but nothing is really working. If I flatten "all", I get something like shattered stained glass. I have found 2 viable options, but they require that I go layer by layer and process the objects that way. If I isolate a layer, flatten it and then overkill everything on that layer... things seem to work. Any idea how I can get this into code?
     
    perriwinkle, Dec 20, 2004
    #1
  2. perriwinkle

    T.Willey Guest

    Maybe something like
    (setq ActDoc (vla-get-ActiveDocument (vlax-get-ACAD-Object)))
    (setq Lays (vla-get-Layers ActDoc))
    (vlax-for item Lays
    (vla-put-LayerOn item ':vlax-false)
    (vla-put-Freeze item ':vlax-true)
    (vla-put-Lock item ':vlax-false)
    )
    (vlax-for item Lays
    (vla-put-LayerOn item ':vlax-true)
    (vla-put-Freeze item ':vlax-false)
    <do you stuff here>
    (vla-put-LayerOn item ':vlax-false)
    (vla-put-Freeze item ':vlax-true)
    )

    Tim
     
    T.Willey, Dec 20, 2004
    #2
  3. perriwinkle

    Randall Culp Guest

    Why do you "need" them 2D? You know you can edit/plot 3D elements just as
    easily as 2D.
     
    Randall Culp, Dec 21, 2004
    #3
  4. perriwinkle

    perriwinkle Guest

    This is an extremely high volume, quick turnaround kind of job that will be sent to our client. If my guys need to draw in a new wall or modify the existing walls that will cost us time we don't have. We can not afford to have appliances below the floor/above the ceiling or floating in space. It needs to be clean and quick, with dimensions that are dependable.
     
    perriwinkle, Dec 21, 2004
    #4
  5. perriwinkle

    perriwinkle Guest

    Thanks for your help. I now have the list of layers, however, I get an error that reads "error: Automation Error. Invalid layer" what am I doing wrong. I just removed the "do stuff here and added a vl-load-com to the beginning... I know so little about visual lisp that I get lost in what your doing. I understand that you are setting ActDoc to the current drawing and then setting Lays to the layers in ActDoc, but I don't understand what item is... is it a member of Lays?
     
    perriwinkle, Dec 21, 2004
    #5
  6. perriwinkle

    T.Willey Guest

    Maybe the problem is that it doesn't know which layer to start on, and you can't freeze the current layer. I guess the way to do it would be either make layer 0 the current layer, then do what I did, or make a new temp layer in each drawing, make that current, then run it, then delete the temp layer.

    To add a new layer, once you get the layer collection, use
    (setq tmpLay (vlax-invoke-method Lays 'Add "temp1253"))
    Just something random, so it won't repeat. Then you make that layer active like
    (vla-put-ActiveLayer ActDoc tmpLay)

    Another thing is if you go the temp layer route, the for statement would look like
    (vlax-for item Lays
    (if (/= item tempLay)
    (progn
    (vla-put-LayerOn item ':vlax-false)
    (vla-put-Freeze item ':vlax-true)
    (vla-put-Lock item ':vlax-false)
    )
    )
    )

    This would be the top part.

    Hope that makes some sense.

    Tim
     
    T.Willey, Dec 21, 2004
    #6
  7. perriwinkle

    perriwinkle Guest

    Thanks so much! I appreciate the help! I will put it all together and get back to you with the results. If it works it will really help us out. 3d just isn't our cup of tea right now...
     
    perriwinkle, Dec 21, 2004
    #7
  8. perriwinkle

    T.Willey Guest

    Cool. Hope it does. If you need help understanding something, I will do the best I can. I have gotten most of the stuff I know from here, and the help doc's within Acad.

    Good luck.
    Tim
     
    T.Willey, Dec 21, 2004
    #8
  9. perriwinkle

    Randall Culp Guest

    Glad to see you got some help, but 3D is very capable of all you've
    described above. Somewhere along the line you're going to HAVE to make the
    move, maybe not this week or this year, but it's coming none the less. The
    sooner you begin to make the move the easier it's going to be.
     
    Randall Culp, Dec 21, 2004
    #9
  10. perriwinkle

    perriwinkle Guest

    I know its coming... and am doing what I can to move that way. It is difficult to say the least but I have real anxiety about what happens if we don't adjust.
     
    perriwinkle, Jan 3, 2005
    #10
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.
Similar Threads
There are no similar threads yet.
Loading...