ASH71 Posted June 6, 2023 Share Posted June 6, 2023 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 Quote Link to comment Share on other sites More sharing options...
Steven P Posted June 6, 2023 Share Posted June 6, 2023 See how LSChainage works for you here: Fonts and so on can be changed in the LISP Quote Link to comment Share on other sites More sharing options...
ASH71 Posted June 6, 2023 Author Share Posted June 6, 2023 Cheers Steve, that works great! Thanks for the quick response as well! 1 Quote Link to comment Share on other sites More sharing options...
Steven P Posted June 6, 2023 Share Posted June 6, 2023 Quick response if I can remember posting the code recently - glad it helps and if you need any changes let me know Quote Link to comment Share on other sites More sharing options...
ASH71 Posted June 6, 2023 Author Share Posted June 6, 2023 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 Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted June 6, 2023 Share Posted June 6, 2023 (edited) Just use : (read (rtos 4776.5765 2 0)) Edited June 6, 2023 by marko_ribar 1 Quote Link to comment Share on other sites More sharing options...
Steven P Posted June 6, 2023 Share Posted June 6, 2023 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 )) ) Quote Link to comment Share on other sites More sharing options...
ASH71 Posted June 7, 2023 Author Share Posted June 7, 2023 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. Quote Link to comment Share on other sites More sharing options...
ASH71 Posted June 7, 2023 Author Share Posted June 7, 2023 Ignore me - I was doing something wrong. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.