SET Polyline/Text/Line/Mtext TO ELEVATION OF ZERO

SET Polyline/Text/Line/Mtext TO ELEVATION OF ZERO

Bin2009
Advocate Advocate
377 Views
5 Replies
Message 1 of 6

SET Polyline/Text/Line/Mtext TO ELEVATION OF ZERO

Bin2009
Advocate
Advocate

Hello,

I am looking for a lisp that lets me select or window objects, then if contain any Polyline, Text, Line, Mtext, will set them all to an elevation of zero.

The reason is the drawing original created by civil 3d, but been explore to Autocad drawing, so there some object have different elevation. But we need the elevation for all the object on zero. 

Below is an example, I got lines, mtexts, texts high about zero, I hope can have some better way than manually change the elevation for each type of object to 0.

Bin2009_0-1755882402439.png

 

Can someone help me out. thanks in advance!!

Bin

0 Likes
Accepted solutions (1)
378 Views
5 Replies
Replies (5)
Message 2 of 6

Kent1Cooper
Consultant
Consultant

Does the FLATTEN command do what you want?  [In PLAN view in the current Coordinate System, of course.]  If not, describe in detail what is different.

Kent Cooper, AIA
0 Likes
Message 3 of 6

Bin2009
Advocate
Advocate

Hello Kent, 

Thank for responding, we been told should not use FLATTEN, they said will cost some issue, sometimes lost lines. I don't know why, I will find out the reason.

Thanks,

Bin

0 Likes
Message 4 of 6

paullimapa
Mentor
Mentor
Accepted solution

Try this:

(defun c:MvToZ (/ ss typ)
 (setq typ "LINE,LWPOLYLINE,*TEXT")
 (princ (strcat "Ojbects Selected must be: " typ))
 (if (setq ss (ssget (list (cons 0 typ))))
    (command "_.CHANGE" ss "" "_P" "_E" "0" "")
 ) ; if
(princ)
)

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 6

Bin2009
Advocate
Advocate

Hello Paul, 

Your lisp is perfect work for me, I added HATCH and CIRCLE.

Thank you so much!

Bin 

0 Likes
Message 6 of 6

paullimapa
Mentor
Mentor

You are welcome…cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes