Delete all elevation points on all/multiple selected featurlines

Delete all elevation points on all/multiple selected featurlines

kylehalchin
Contributor Contributor
3,021 Views
5 Replies
Message 1 of 6

Delete all elevation points on all/multiple selected featurlines

kylehalchin
Contributor
Contributor

1. What I would like to do is be able to select a bunch of featurelines that all have a lot of elevation points and then delete all elev points at once instead of going thru each line individually. Does anyone know of a lisp out there that will delete all elevation points (not PI points) of multiple/all featurelines or 3D polyines? Or a better workflow?

2. And on the flip side...does anyone know of a lisp that would add elevation points to a bunch of featurelines at a given interval all at once (instead of one individual line at a time)?

Any input is welcome.

0 Likes
3,022 Views
5 Replies
Replies (5)
Message 2 of 6

dlanorh
Advisor
Advisor
A drawing containing an example elevation point and feature line might help, for me AutoCAD2010 format.

I am not one of the robots you're looking for

0 Likes
Message 3 of 6

braudpat
Mentor
Mentor

Hello 

 

Have you : 

- 3D single Lines?

And/Or 

- 2D PLines at multiple Elevations ?

And/Or 

- 3D PLines ? 

 

The first 2 cases can be moved to Elevation = Zero with Properties dialog box...

 

For 3D Plines you need a Lisp ...

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 4 of 6

Jeff_M
Consultant
Consultant

This takes care of the first request:

(defun c:removeallelevationpoints (/ ss idx ent fl elevpts pt i)
  (vl-load-com)
  (if (setq ss (ssget '((0 . "AECC_FEATURE_LINE"))))
    (progn
      (setq idx -1)
      (while (setq ent (ssname ss (setq idx (1+ idx))))
	(setq fl (vlax-ename->vla-object ent))
	(setq elevpts (vlax-invoke fl 'getpoints 2))
	(setq i -1)
	(while (< i (- (length elevpts) 1))
	  (setq pt (list (nth (+ 1 i) elevpts) (nth (+ 2 i) elevpts) (nth (setq i (+ 3 i)) elevpts)))
	  (vlax-invoke fl 'DeleteFeaturePoint pt)
	  )
	)
      )
    )
  (princ)
  )
Jeff_M, also a frequent Swamper
EESignature
Message 5 of 6

kylehalchin
Contributor
Contributor

I'm working with 3d plines and featurelines.

0 Likes
Message 6 of 6

kylehalchin
Contributor
Contributor

Thanks Jeff_M! I'll try that string of code first thing monday!

0 Likes