Author Topic: We need Lisp for chainage label to all polylines at once select.  (Read 1045 times)

0 Members and 1 Guest are viewing this topic.

kkr028

  • Mosquito
  • Posts: 1
We need Lisp for chainage label to all polylines at once select.
Chainage label direction is perpendicular to polyline direction.
And Chainage Label Layer is "Chainage" (Create layer in Lisp)
it will ask after lisp loaded....

Start Chainage?
Chainage Text Size?
Chainage Interval?

here example what i require.

dexus

  • Bull Frog
  • Posts: 211
Re: We need Lisp for chainage label to all polylines at once select.
« Reply #1 on: April 05, 2022, 09:02:46 AM »
How far did you get yourself?

Once you have a loop going through the polylines you can use
Code - Auto/Visual Lisp: [Select]
to get the points to place the mtext.

To get the angle at that point you can use the following snippet:
Code - Auto/Visual Lisp: [Select]
  1. (defun vlax-curve-getAngleAtPoint (obj point)
  2.   (angle '(0. 0. 0.) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj point)))
  3. )

Hope this helps to get you started, obviously there is a lot more coding to do.


BIGAL

  • Swamp Rat
  • Posts: 1429
  • 40 + years of using Autocad
Re: We need Lisp for chainage label to all polylines at once select.
« Reply #2 on: April 06, 2022, 03:35:01 AM »
Not sure what is so hard.

Google "Chainage.lsp autocad"
A man who never made a mistake never made anything