MP7 Posted February 6, 2020 Posted February 6, 2020 Hello guys, anyone knows if there is a lisp that copies a line or polyline length automatically to clipboard after selecting it? I have A LOT of polylines and I have to insert their lengths into a table, it's a bit of a pain in the ass having to write every single length, just select paste select paste seems faster right? :) Thx. Quote
dlanorh Posted February 6, 2020 Posted February 6, 2020 Why not automate the whole process including the table? Quote
MP7 Posted February 6, 2020 Author Posted February 6, 2020 Hey mate, how could it automate it? I was thinking of that above as the simplest and fastest. Unfortunately I can't eattext from them as each polyline is specific to a certain row... Quote
dlanorh Posted February 6, 2020 Posted February 6, 2020 I've just noticed that your AutoCAD version is LT. LT cannot run lisps. If that is no longer the case then take a look Here (Example) Quote
MP7 Posted February 6, 2020 Author Posted February 6, 2020 (edited) Ah yes sorry, forgot to update that info, not using LT anymore. Yes I supposed something like that existed but correct me if I'm wrong, you just get a lengths export of all selected entities but the problem is I need lengths of specific polylines linked to specific rows in excel. Fact is I have a lot of cables running from a specific pole and their lengths need to be linked to specific places in a table. specific pole -> length of specific polyline -> specific position in table Edited February 6, 2020 by MP7 Quote
dlanorh Posted February 6, 2020 Posted February 6, 2020 Without seeing a table/excel sheet I can't assess the possibilities. You can however select polylines in a specific order, and/or sort using lisp. Quote
MP7 Posted February 6, 2020 Author Posted February 6, 2020 OK here it is, drawing and table and there will be A LOT of polylines... :) Quote
BIGAL Posted February 6, 2020 Posted February 6, 2020 Like dlanorh if you can make the complete table line in one go its much easier as you just add rows, if the table exists you can pick a cell hint Lee-mac.com, the other alternative is to nominate the excel cell address and fill it in, another is to drive it all from excel. Do you really need the Autocad Table ? Plenty of examples about making and adding to tables your task has been answered before. Pretty sure can insert a row as well. Post a dwg and xls, confirm exactly what way you want the answer, plenty here will respond pretty quick. You need to look at what your posting in the image use Prtscrn, then Paint paste image and use the clip option, Ctrl+C paste to Cadtutor. Snipping tool is built in to windows 10 to grab parts of a screen. Quote
MP7 Posted February 23, 2020 Author Posted February 23, 2020 Sorry for being so late. Yeah well here it is, just extracts of drawing and excel. I highlighted the column in excel where the lengths are inserted, I have 5 situations and each has like 100 cable lengths to be inserted. :/ DWG.dwg table.xlsx Quote
BIGAL Posted February 24, 2020 Posted February 24, 2020 Trying to work out what values go where it would make sense to do a simple csv of all the info required reading the pline and the block attributes. Noticed some rounding going on also. if you can make a jpg paste into autocad and draw lines linking the attributes to a column would go a long way to making the entire line. Quote
MP7 Posted February 24, 2020 Author Posted February 24, 2020 Sorry I'll try to explain, it's pretty simple though. Iny the example there are 4 polylines that matter, in the drawing there are attributed blocks close to those respective polylines, named S-106 to S-109 and in the table their lengths need to be entered in column Q (I highlighted it in yellow in the table). Quote
tombu Posted February 24, 2020 Posted February 24, 2020 See also: https://www.theswamp.org/index.php?action=notifyboard;board=2.0 and https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-for-connect-between-attribute-definition-values-electrical/td-p/9336765 1 Quote
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.