Drawing polylines with elevation

Drawing polylines with elevation

civilman1957
Advisor Advisor
10,565 Views
19 Replies
Message 1 of 20

Drawing polylines with elevation

civilman1957
Advisor
Advisor

Good morning,

Does anyone know of a lisp with which you can create polylines with an elevation other than 0? We create many drawings that have extensive grading - subdivisions, commercial sites, etc. - and it's rough to convince some of these folks not to create polylines with 0 elevation and just notate the elevation with mtext. That's dangerous (I've found several mislabeled) and useless in calcl'ing earthwork volumes.

I located a couple that can change the elevation more quickly than using Properties, but so far, that's it...

Anyone?

Thanks,
Tom

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
0 Likes
Accepted solutions (2)
10,566 Views
19 Replies
Replies (19)
Message 2 of 20

rkmcswain
Mentor
Mentor

Is there a reason you need to use polylines, instead of using feature lines?

Let's play along for argument sake. What would this lisp do, prompt the user for an elevation at each vertex? 

 

In the words of CAD Manager extraordinaire Mark Kiker:

"Don't try to solve a management problem with technology"

0 Likes
Message 3 of 20

civilman1957
Advisor
Advisor

Hey, RK...

 

One of the pitfalls is that you need to set the elevation of each vertex. Yeah, I know you can set it to be a difference of 0 from the first vertex, but there's still room for error. 

I don't know...it's possible, but it's likely to be an uphill battle with my dept. head...he's very old school...

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
0 Likes
Message 4 of 20

Udo_Huebner
Mentor
Mentor

With Civil 3D you hat 3 good objects to draw lines with elevation.

 

a) 2D-Polyline (LWPOLYLINE/POLYLINE) with Command PLINE, often used for Contour lines

b) 3D-Polylines (POLYLINE with 3d FLag) with Command 3DPOLY

c) Featurelines (FEATURELINE = Super Polylines) with Command DRAWFEATURELINE

 

a) a 2D Polyline (most of the time a LWPolyline) can have lines and Arcs but only one elevation for all vertices.

b) a 3DPOLYLINE can have an individual Z elevation on every single vertex, but no arcs (and line type is shown only if LINETYPE3DPLINEON is activated)

c) Featurelines combines all advatages from 2D-Polylines and 3D-Polylines + names + Civil Styles + extra Elevation Points +...

 

Gruß Udo Hübner (CAD-Huebner)
Message 5 of 20

ChicagoLooper
Mentor
Mentor

What are you trying to accomplish with your 3D polylines? Surely you must be doing something with those polylines once they're created and not just create 3D poly's for the sake of making 3D polys, correct? 

 

@civilman1957  wrote

<<create polylines with 0 elevation and just notate the elevation with mtext>>

 

This sounds like topographic contour lines and that's different from 3D polylines.

Chicagolooper

EESignature

0 Likes
Message 6 of 20

civilman1957
Advisor
Advisor

I never said I was using 3D polylines  - I don't WANT to use 3D polylines...my original inquiry was whether anyone knew of a lisp routine whereby you can create 2D polylines and assign elevation to them as you create them. 

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
Message 7 of 20

Udo_Huebner
Mentor
Mentor

The

Command: ELEVATION
Enter new value for ELEVATION <0.000>: 10

Specifies the initial elevation for polylines with the PLINE command when the elevation of the selected start point is 0.0. If you input or snap (with Osnaps) a start point with a non-zero elevation, that elevation is used instead.

If you want to click the XY but input the Z value for a 2D Polyline, use Point filters

Command: PLINE
Specify start point: .xy of (pick point)
(need Z): 15

A Lisp is not necessary, just use PLINE with .XY as a button Macro in ToolPalette.

 

Gruß Udo Hübner (CAD-Huebner)
Message 8 of 20

ChrisRS
Mentor
Mentor

@civilman1957, take a deep calming breath.

Your origimal post does not mention 2D polylines. From the context of your question I assumed 3D polylines. Apparently so did everyone else. Hmmm ...

Snippy replies to the volunteers trying to answer your question is not a best practice.

Christopher Stevens
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 9 of 20

Anonymous
Not applicable

I assumed 2D polylines and it made me recall the LandDesktop command for assigning elevation to polylines. You'd pick, assign an elevation, then go to the next at a specified interval. It was fast.

 

The nearest thing I found in C3D is on the Modify ribbon tab, Design panel, pull down to Edit Polyline Elevations (_AeccEditPlineElevs). It doesn't automatically go up/down at an interval when you go to the next polyline, but it's certainly faster than the Properties dialog. Select a PL, key-in an elevation, the command stays active, select the next PL, key-in an elevation, etc. So it's pick, key-in, enter, right down the line. Someone has to actually do it, though - after the fact - and enter data correctly. To check I would create a temp surface of the polylines and label the contours. 3DORBIT will also show you the polylines at elevation, but whether or not they are correct isn't as apparent, unless they are at 0, like a contour label is.

 

Edit - I just tested that command and it does go at an interval. In my case down 1 ft at the next polyline relative to the last one selected. I do not know how you assign interval, though - maybe hidden in a command setting somewhere?

0 Likes
Message 10 of 20

MMcCall402
Mentor
Mentor
Accepted solution

I've been using the following Lisp to assign elevations to polylines.  Afterwards, select all your polylines and view them in the object viewer, tilted to show their elevation, and you'll see any you've missed or made a big mistake with their elevation.  After they're created I label them with a line/curve label that uses their start z value.

 

 

(defun C:CEI ; = Contour Elevations at Intervals
(/ elv inc pldata)
(setq
elv (getdist "\nStarting elevation: ")
inc (getdist "\nContour interval: ")
); setq
(while (setq pl (entsel "\nSelect a Contour to move to next elevation: "))
(setq
pldata (append (entget (car pl)) '((62 . 256)))
pldata (subst (cons 38 elv) (assoc 38 pldata) pldata)
elv (+ elv inc)
); setq
(entmod pldata)
); while
); defun

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

0 Likes
Message 11 of 20

AllenJessup
Mentor
Mentor
Accepted solution

The attached will do it. It starts with PLE. Remember to set Elevation to 0 when done.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 12 of 20

civilman1957
Advisor
Advisor

Quite right...I had a pretty horrendous start to my week...my apologies, Chicago...

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
0 Likes
Message 13 of 20

ChrisRS
Mentor
Mentor

Thanks, @civilman1957. I hope that your week improves!

Christopher Stevens
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 14 of 20

civilman1957
Advisor
Advisor

BINGO! YAHTZEE1 We have a WINNER...

Allen, if you didn't have a beard, I'd kiss you right on the mouth, my brother...

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
Message 15 of 20

civilman1957
Advisor
Advisor

It will...never let the machines win...:)

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
0 Likes
Message 16 of 20

civilman1957
Advisor
Advisor

Hey, M...

 

Allen's got the solution for creating pl's with elevation, but I'm hanging onto yours too, for those lines that have been created already, and someone has to go back in and clean up...appreciate it, brother...

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
0 Likes
Message 17 of 20

AllenJessup
Mentor
Mentor

@civilman1957 

I actually hope someone jumps in with an improvement on my lisp. For some reason I couldn't understand. If I tried to set ELEVATION back to 0 before the routine ended. The polyline would end up at 0. There should be a way and it would be a much better routine if it were done that way. But hope it helps you out. (Kisses or not).😉

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 18 of 20

civilman1957
Advisor
Advisor

Trust me, this will get the job done. Once again, private folks improving on expensive software that just doesn't do some things very well...

Cad Manager/Senior Engineering Technician
Autodesk Certified Professional

Intel(R) Core (TM) i7-7700 CPU
3.60 GHz/24 GB BEAST
Civil 3D 2013/2014/2017/2018/2020
0 Likes
Message 19 of 20

Joe-Bouza
Mentor
Mentor

I know you are solved with lisp but were you aware that the Modify design panel has a command to assign to polylines. I find it very handy

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 20 of 20

NateSarles
Advocate
Advocate

Old thread I know, but I was noticing that this LISP only works when osnapz is set to 1. I generally work with it set to 0. Is there a way to add that setvar correctly to the lisp so it is not needed to manually set it every time?

 

Having to set the elevation back to 0 as well as the osnapz back to 0 at the end of the lisp would also make sense but alas, I am code illiterate and can't figure this out.

 

I tried this a few different ways but I am not the best coder so I was unsuccessful.

C3D 2022
Experienced Civil Site Designer/Drafter
Windows 11, 64 GB RAM
13th Gen Intel(R) Core(TM) i7-13850HX
0 Likes