Hi, ive got autocad on macOS, ive got a lisp file to select all the lines to give me the total measurements in millimetres, but this wont work on macOS, is there a compatible file that i can use to do this because the measurgeom option on autocad takes to long to do all designs by just selecting them
The topic title has been edited to improve findability by @alina.balkanskaia. Original: Total Length in MacOS
Solved! Go to Solution.
Solved by maxim_k. Go to Solution.
Solved by maxim_k. Go to Solution.
Welcome to Autodesk Forums!
Hi Marius,
Try attached tlen.lsp which:
"Calculates and reports the total length of a selection set of line, polyline, arc, circle, ellipse, and other objects in drawing."
It works fine on my Mac.
Hello Maxim,
Please help me.
I have pasted the tlen.lsp in the ApplicationAddins folder of ACADLT 2019 but the command tlen is does not working.
I have to measure a total lenght of 2021 pipelines and I am desperate!
May you help me please to understand how to do this?
Many thanks in advance
Andrei Vrublevschi
Beginner in ACAD business
Hi Maxim,
Thank you very much for your quick reply.
So, to be clear for me, have I any chance to calculate a total lenght with ACAD LT ?
Regards,
Andrei
Well, also AutoCAD LT "LT is the wrong software for what you need to do", if you have Excel on your Mac, you can try the solution from this thread:
https://forums.autodesk.com/t5/autocad-lt-forum/how-to-measure-total-length/td-p/6317587
To be more precisely, you need Total length.xls spreadsheet from this post:
https://forums.autodesk.com/t5/autocad-lt-forum/how-to-measure-total-length/m-p/7160235#M155052
You also need to make some preparations in AutoCAD LT - enable LOG file for the time you will collect data for calculations - results of LIST command. So at first you need to verify (or change) the location of AutoCAD LOG file in AutoCAD preferences -> Application tab ->Log file location:
Then you need to turn on LOG file creation with LOGFILEON command.
From now all Command prompt output will be written to XXX.log file (XXX - the name of current drawing) in the folder you set for Log File Location.
Now you need to set undocumented system variable QAFLAGS=2 - this will allow not to use LIST command without any interaction, until it complete its job.
Now - use QSELECT command to select polylines (or other types of objects you want to calculate total length) in your drawing. After you select all polylines you need (they should be selected) - use LIST command to collect information about them.
If you don't need calculate length anymore, turn off LOG file creation (other way Log File Location folder will be blowed with unnecessary .log files)
Open "XXX.log" file created for your drawing in plain text editor (Textedit app), you will see something like this:
Command: LOGFILEON Command: QSELECT Select objects: Specify opposite corner: 4645 found Select objects: 4157 item(s) selected. Command: LI LIST 4157 found LWPOLYLINE Layer: "AXIS" Space: Model space Handle = 15d968 Open Constant width 0.0000 area 0.0000 length 2518.8764 at point X=204049.8573 Y=73259.8524 Z= 0.0000 at point X=204049.8573 Y=70740.9761 Z= 0.0000 LWPOLYLINE Layer: "AXIS" Space: Model space Handle = 15d964 Open Constant width 0.0000 area 0.0000 length 2518.8764 at point X=197483.6713 Y=73259.8524 Z= 0.0000 at point X=197483.6713 Y=70740.9761 Z= 0.0000 ....... LWPOLYLINE Layer: "WIN" Space: Model space Handle = 15c73c Closed Constant width 0.0000 area 146763.8186 perimeter 1606.5530 at point X=201932.3048 Y=76774.7109 Z= 0.0000 at point X=202150.3897 Y=76390.8032 Z= 0.0000 at point X=202484.3305 Y=76394.3305 Z= 0.0000 at point X=202358.4077 Y=76779.1939 Z= 0.0000 LWPOLYLINE Layer: "WIN" Space: Model space Handle = 15c73b Open Constant width 0.0000 area 0.0000 length 415.1461 at point X=190108.7357 Y=76711.6982 Z= 0.0000 at point X=190206.1890 Y=76308.1525 Z= 0.0000 Command:
Now select everything from the beginning of LIST command to its end and copy to clipboard.
If you don't need calculate length anymore, turn off LOG file creation (other way Log File Location folder will be blowed with unnecessary .log files)
Open Total length.xls in Excel and allow macros in it.
Use the button labelled 'paste & calculate'. The object properties text will be pasted into column A and the formula in column B will analyse the text & extract the relevant length data. The total length will then be displayed in the green result box in your chosen format. (full description of how it works in spreadsheet - see in the post I linked above)
That is all.
Once again - don't forget to switch off creation of LOG file + set QAFLAGS=0 (default value) after you will make all calculations.
Добрый день.
Спасибо за вашу работу!
Есть проблемка с Tlen.lsp
Я загрузил его через команду appload, он вроде успешно загрузился, но не работает.
Добрый день, Максим.
В командной строке прописано, что файл успешно загружен.
Пробовал на разных файлах, не работает.
При вводе команды applad, в всплывающем окне лисп прописан но не активен (скинул скрин)
Я все делал, как для автокада под виндоус. Тоже кастати ваш лисп загружал - все работало
Спасибо!
У меня все работает с Вашим файлом:
Вы точно загружаете необходимый LSP?
>>>>При вводе команды applad, в всплывающем окне лисп прописан но не активен
На вкладке "Loaded applications" он и должен быть неактивным, поскольку эта вкладка предназначена для выгрузки (unload) приложений из памяти, а приложения AutoLISP выгрузить командой нельзя - они выгружаются автоматически при закрытии файла, в котором были загружены (если только они не прописаны в Startup Suite)
Welcome to Autodesk Forums!
Hi @djunira2014
Yes, you need to load it every time, but you can ad it to Startup Suite in APPLOAD window and it will be loaded automatically:
http://help.autodesk.com/view/ACDMAC/2021/ENU/?guid=GUID-B38F610B-51FB-4938-BDEC-A0A737F5DB6C
@AnonymousI'm 4 years late, but was looking at this thread trying to solve a similar issue. I also have LT, plus I'm a novice at computer science, so the solution will take too much brain power for me. However, I have a painstaking work around for others who come across this thread; it may be helpful. Can you connect all the segments of your pipeline into 1 single polyline? Then select the polyline and see the total length in the properties window?
hello,
im also novice here trying to improve my productivity with the few knowledge that i have.
for that exemple, if you have plines instead of lines you can automatically sum all (even if not connected)
hope it helps
r^2
Can't find what you're looking for? Ask the community or share your knowledge.