Coding Macros for Polylines Total Length

Coding Macros for Polylines Total Length

Anonymous
Not applicable
5,919 Views
23 Replies
Message 1 of 24

Coding Macros for Polylines Total Length

Anonymous
Not applicable

Hi there! i'm wreking my brains out trying to code a macros to return the total length for all my similar polylines  on my drawing. Now, from what i've seen coding relies on already in place commands used by Autocad LT (i'm using 2016), but there is no such command that returns to you the length value of a specific polyline, in the command bar. (i know , the length of a polyline can be found in the proprieties table, but i cannot tie with my code to that value, as it needs to be a command to return the specific value).

Please correct me if i'm doing/saying somehing wrong! Any advice would be much appreciated!

0 Likes
Accepted solutions (3)
5,920 Views
23 Replies
Replies (23)
Message 21 of 24

Anonymous
Not applicable

@steven-g- thanks for the reply on this.

 

I wish I could say I have the same luck as you.

Given your reply, I thought I would try to place the macro into a very bare-bones default settings drawing.

To my dismay, it did somewhat similar, with my mouse icon flickering while it did... something. 

When the mouse quit flickering, the program sat frozen with no error message other than (Not Responding) for a couple minutes before I finally snuffed it with the task manager.

 

I did end up going into our subscription service and found that, per our license, we are able to install and run versions of LT back to 2019, so I installed 2021 and its subsequent updates, and the macro again works as it used to.

 

Still quite baffled as to what could have changed between 2022 and 2022.1 that would make it stop working for me, as it did.

 

Thanks again for the reply, and I'll attempt to tackle getting a log-file pending available time between tasks.

0 Likes
Message 22 of 24

pendean
Community Legend
Community Legend

@Anonymous no such issues with the macro here in 2022.1 in my own drawings either.

 

Screen flickering/cursor flickering sounds like a graphics issue: Set GFXDX12 variable to 0 (that's a zero) then restart AutoCAD/LT2022: reverting to DirectX11 fixes similar problems for most users.

Also consider turning off LINESMOOTHING and LINEFADING variables (in both LT2021 nd LT2022): if still no relief then start GRAPHICSCONFIG command and change the 2D Display Settings pulldown from "advanced mode" to one of the other choices.

If all else fails, then turn off Hardware Acceleration as a last resort in LT2022.

0 Likes
Message 23 of 24

engaboelnaga96
Participant
Participant

Hello everybody.


I faced this problem because  i already  have to working on AutoCAD LT2022 

in past  i worked AutoCAD 2022  with lisp "lpl & totl" with my personal labtop 
Really ,, iam stuck  and need help 
How to run macro and  add the code  from scratch on AutoCAD LT2022 

0 Likes
Message 24 of 24

Scottu2
Advocate
Advocate

Paul,

I was using the LEN (lengthen) to get the line lengths and then flip to the text screen to add them up manually.

The macro code works for AcadLT 2023. A great time saver.

Thank you!!

0 Likes