3d to 2d
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
3d to 2d

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
perriwinkle
Guest





Posted: Tue Dec 21, 2004 3:25 am    Post subject: 3d to 2d Reply with 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
T.Willey
Guest





Posted: Tue Dec 21, 2004 4:01 am    Post subject: Re: 3d to 2d Reply with quote

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 Reply with quote

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 Reply with 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: Tue Dec 21, 2004 7:01 pm    Post subject: Re: 3d to 2d Reply with quote

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 Reply with quote

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 Reply with quote

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 Reply with quote

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 Reply with quote

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 Reply with quote

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
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB