Jump to content

how do I flatten this?


chelsea1307

Recommended Posts

So, we got new backgrounds for this job and i cant get it to flatten into 2d from 3d. Ive tried using the flatten.lsp and another lisp i found called flat.lsp and neither worked. i tried exploding the entire dwg and then trying both of those and still it didnt work. Im trying to make the file smaller so i can upload it but if you have any suggestions in the mean time on how to do it let me know

Link to comment
Share on other sites

What about selecting all objects and changing the Z elevation property to 0?

 

Change - Properties - Elevation - 0

 

Perhaps I'm way off with what you're actually doing...

Link to comment
Share on other sites

did you try this...?

 

; Flatten a 3D drawing

; Written by Eduard

; This command will set all elevations and points to zero, effectively flattening any 3D drawing.

(defun c:flat (/ total-nabor)

(vl-load-com)

(if

(setq total-nabor (ssget "x" '((410 . "model"))))

(progn

(setq total-nabor

(mapcar 'vlax-ename->vla-object

(mapcar 'cadr

(ssnamex total-nabor)

) ;_ end of mapcar

) ;_ end of mapcar

) ;_ end of setq

(foreach i '(1e99 -1e99)

(mapcar (function (lambda (x)

(vla-move x

(vlax-3d-point (list 0 0 0))

(vlax-3d-point (list 0 0 i))

) ;_ end of vla-move

) ;_ end of lambda

) ;_ end of function

total-nabor

) ;_ end of mapcar

) ;_ end of foreach

) ;_ end of progn

) ;_ end of if

(princ)

) ;_ end of defun

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...