Jump to content

Recommended Posts

Posted

Hello everyone / anyone, I'm looking for some help with producing a lisp file. I've looked through the site and can't find anything that has already been written that can do what I need (sorry if I missed it). I have been using AutoCAD lite for years (company won't pay for full one), anyway the new update allows the use of lisp files so was wondering if anyone smarter than me could write a simple lisp for me please?

If possible I would like to annotate a polyline from one end to each point (I have attached a rough sketch to show what I mean).

 

Thanks for looking, any help greatly appreciated.

 

Ash

Lisp request.png

Posted

See how LSChainage works for you here:

 

Fonts and so on can be changed in the LISP

 

 

Posted

Cheers Steve, that works great! Thanks for the quick response as well!

  • Like 1
Posted

Quick response if I can remember posting the code recently - glad it helps and if you need any changes let me know

Posted

Sorry to be so thick but what do I need to change so that the numbers have no decimal places - e.g. 4776.5765 to 4777. Sorry if it's not clear.

 

Thanks again.

 

Ash

Posted (edited)

Just use : (read (rtos 4776.5765 2 0))

Edited by marko_ribar
  • Like 1
Posted

Yup, Marko is right, though not being thick - it is quite a long code to find out what to change.

 

If you want to have a go search for (rtos and add '2 0' after what is there. see if that works - there should only be 2 of them in the code 50/50 you guess the right one first time, this explains the numbers: https://help.autodesk.com/view/OARX/2022/ENU/?guid=GUID-D03ABBC2-939A-44DB-8C93-FC63B64DE4A2

 

 

and if you want us to do it, this

 

(LM:setattributevalue MyLastBlock "VALUE_MEASURE" (strcat (rtos acount) ": " (rtos (nth acount dist_list_orig))) )

 

should become

 

(LM:setattributevalue MyLastBlock "VALUE_MEASURE" (strcat (rtos acount) ": " (rtos (nth acount dist_list_orig) 2 0 )) )

 

 

Posted

Thanks again for the quick response.

 

I have tried putting that in the code but it actually double the amount so e.g. 4577.4545 becomes 4577.45457678 if that makes sense?

 

I'm having a go to see if I can work it out my self but any help would be appreciated.

Posted

Ignore me - I was doing something wrong.

 

Thanks for your help.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...