Survey Figures to Polylines LISP Modification

Survey Figures to Polylines LISP Modification

Anonymous
Not applicable
1,442 Views
2 Replies
Message 1 of 3

Survey Figures to Polylines LISP Modification

Anonymous
Not applicable

Hello Folks,

 

I use this LISP to convert Survey Figures (C3D) to Polylines (downloaded here from forum) and to bring them to elevation 0.00. But for example, after importing new Survey Figures to the drawing, if I use this LISP in a drawing that already contains countour lines as Polylines with elevations, they will be at 0.000 elevation in the end of routine. I would like to keep them with their elevations after running this routine just bringing to 0.000 the Survey Figures that was converted in first selection using (ssget "X" '((0 . "AECC_SVFIGURE*")))) to Polylines. Is there any way to modify this LISP to get this task done, without touching the rest of the drawing?

 

Here is the code for the attached file:

 

(defun C:STEAMROLLER ()

(initget "Yes No")

(if

(=

(getkword "Are you sure you want to run this command? Steamroller will convert ALL survey figures to 2D polylines and will segment all arcs contained within survey figures [Yes/No] <N>: ")

"Yes"

); =

(progn ; 'then'
(setvar "CMDECHO" 0)
(setvar "qaflags" 1)
(if (setq C3DOBJ (ssget "X" '((0 . "AECC_SVFIGURE*"))))
(command "explode" C3DOBJ "" "AeccConvert3dPolys" "P" "")
)
(if (setq C3DOBJ (ssget "X" '((0 . "AECC_FEATURE_LINE*"))))
(command "explode" C3DOBJ "" "AeccConvert3dPolys" "P" "")
)
(if (setq C3DOBJ (ssget "X" '((0 . "POLYLINE*"))))
(command "AeccConvert3dPolys" C3DOBJ "")
)
(if (setq C3DOBJ (ssget "X" '((0 . "LWPOLYLINE*"))))
(command "CHANGE" C3DOBJ "" "P" "ELEV" "0" "" "PEDIT" "M" "P" "" "L" "ON" "")
)
(setvar "qaflags" 0)
(setvar "CMDECHO" 1)

); progn

(prompt "\nOkay then, I won't do it."); 'else'

); if
); defun

 

Thanks for any help.

1,443 Views
2 Replies
Replies (2)
Message 2 of 3

CodeDing
Mentor
Mentor

@Anonymous ,

 

Can you post a sample dwg with both types of lines for us to test with?

0 Likes
Message 3 of 3

Anonymous
Not applicable

Here is the "Example.dwg" file. Thanks!

0 Likes