| Author |
Message |
perriwinkle
Guest
|
Posted:
Tue Dec 21, 2004 3:25 am Post subject:
3d to 2d |
|
|
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?
|
|
| Back to top |
|
 |
T.Willey
Guest
|
Posted:
Tue Dec 21, 2004 4:01 am Post subject:
Re: 3d to 2d |
|
|
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 |
|
| Back to top |
|
 |
Randall Culp
Guest
|
Posted:
Tue Dec 21, 2004 7:30 am Post subject:
Re: 3d to 2d |
|
|
Why do you "need" them 2D? You know you can edit/plot 3D elements just as
easily as 2D.
"perriwinkle" <nospam@address.withheld> wrote in message
news:3637261.1103581553239.JavaMail.jive@jiveforum1.autodesk.com...
| Quote: | 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? |
|
|
| Back to top |
|
 |
perriwinkle
Guest
|
Posted:
Tue Dec 21, 2004 6:45 pm Post subject:
Re: 3d to 2d |
|
|
| 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. |
|
| Back to top |
|
 |
perriwinkle
Guest
|
Posted:
Tue Dec 21, 2004 7:01 pm Post subject:
Re: 3d to 2d |
|
|
| 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? |
|
| Back to top |
|
 |
T.Willey
Guest
|
Posted:
Tue Dec 21, 2004 9:03 pm Post subject:
Re: 3d to 2d |
|
|
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 |
|
| Back to top |
|
 |
perriwinkle
Guest
|
Posted:
Tue Dec 21, 2004 9:10 pm Post subject:
Re: 3d to 2d |
|
|
| 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... |
|
| Back to top |
|
 |
T.Willey
Guest
|
Posted:
Tue Dec 21, 2004 9:29 pm Post subject:
Re: 3d to 2d |
|
|
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 |
|
| Back to top |
|
 |
Randall Culp
Guest
|
Posted:
Tue Dec 21, 2004 10:54 pm Post subject:
Re: 3d to 2d |
|
|
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.
"perriwinkle" <nospam@address.withheld> wrote in message
news:24823383.1103636740967.JavaMail.jive@jiveforum1.autodesk.com...
| Quote: | 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. |
|
|
| Back to top |
|
 |
perriwinkle
Guest
|
Posted:
Mon Jan 03, 2005 7:56 pm Post subject:
Re: 3d to 2d |
|
|
| 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. |
|
| Back to top |
|
 |
|
|
|
|