Labels on grid lisp routine

Labels on grid lisp routine

Yonas89
Collaborator Collaborator
3,001 Views
9 Replies
Message 1 of 10

Labels on grid lisp routine

Yonas89
Collaborator
Collaborator

Hello,

 

I am thinking about LISP routine which would give me a grid (with predefined lenght and width) draw along Alignment (or polyline). I need also that grid would not exceed a defined outer boundary (that could be closed polyline) and woud be trimmed to it. Finallly, at all grid verices I need to put a specific surface elevation label. Please look at the attached image below, for better understanding. 

I have to little experience with autolisp to start write it from scratch, but maybe you can provide me with some directions how to create it or give a link to similiar LISP routines which I believe I can modify? 

0 Likes
Accepted solutions (1)
3,002 Views
9 Replies
Replies (9)
Message 2 of 10

tcorey
Mentor
Mentor
While I wholeheartedly encourage you to learn LISP, this particular task could be accomplished with a corridor


Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 3 of 10

odoshi
Collaborator
Collaborator

I would also avoid LISP for this scenario. You can get a lot done with the corridor as stated. Trying to mix Civil 3D commands/labels with LISP is only going to complicate it more.

 

The only thing the corridor won't do for you if give you those smooth offset grid lines around the corners.

 

But the basic how-to would be this:

 

Create centerline alignment

Create profile along centerline

Create Assembly with Lanes or Marked Points at the offset intervals. Cross Grades do not matter. We just want X-Y locations of the label points.

May want to look into Conditioonal Assemblies and other targeting to turn on/off more subassemblies to match your boundary.

Build corridor.

Extract Feature Lines for edges of Lanes/Marked Points - keep link back to corridor

Label Feature Lines with Generic Labels with Reference Text pointing to surface

 

That's just off the top of my head. Might be better ways...

 

Regards,

 

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
0 Likes
Message 4 of 10

Yonas89
Collaborator
Collaborator

thanks guys, I will try this workflow next week, cause I have no access to  software now.

It looks that I can get the final result, however I am still thinking that LISP routine for this particular task is the best way, because you can avoid many steps you have to make such as creation of alignment, profile, corridor, assembly etc. Though it might be very simple objects it still requires some time to reach the final result.

 

In my opinion LISP routine should consist of 5 main steps.

1Define grid

2Use arraypath command  to create grid along polyline which represents my alignment.

3.Define outer boundary

4.Explode grid and trim polylines to outer boundary

5 Put surface elevation label at each point where to lines intersect.    

0 Likes
Message 5 of 10

Jeff_M
Consultant
Consultant
Why not just use the outer boundary as a boundary in your surface, then use the Spot Elevations on Grid labeling option?
Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 6 of 10

Yonas89
Collaborator
Collaborator

I believe spot elevations on grid cannot be aligned along alignment. I can rotate a grid but cannot align it. Please correct me if I am wrong. 

0 Likes
Message 7 of 10

Jeff_M
Consultant
Consultant
Correct. I read 'grid' literally and didn't see the image you posted until now.
Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 8 of 10

odoshi
Collaborator
Collaborator

Got a little head start on a .NET routine to do it. Works, but still need to add the boundary option.

 

AlignmentGridLabels.png

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
0 Likes
Message 9 of 10

odoshi
Collaborator
Collaborator
Accepted solution

I made the dialog modeless and merged in the EXTRIM command. So now it handles boundaries, if anyone would like to give it a test.

 

Mike Caruso
Autodesk Certified Instructor 2014
AutoCAD/Civil 3D Autodesk Certified Professional 2014, 2015, 2018
www.whitemountaincad.com
Message 10 of 10

neilyj666
Mentor
Mentor

I'll try it

 

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2026 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
0 Likes