If I have a series of lines on a layer, is it possible for a macro to place a label for the lengths of the lines at the center of each line in AutoCAD LT 2012? Adding a DIMLINEAR to each line is for the birds....my drawings have as many as 250-300 lines that need to be labeled with thier lengths.......
Do you need to draw the lines freehand or could a Block be used?
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
If I may ask, what command would you use to do this? a Macro in LT is the same as typing it at the command line for the most part, there is no secret 'code' to do any more that than in LT.
You could speed up DIMLINEAR if that's the format you need with a macro, since you only need to pick the line to dimension it and not it's end points. So now you are down to two clicks instead of four, and the macro restarts over and over again until you tap ESC cancel button on your keyboard:
*^C^C_dimlinear;;\\
If the lines are in a row/series, perhaps DIMCONTINUE command is what you need?
Not in one click that won't happen.
You've got too many different length lines to have a macro do what you want in one click.
Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
As Charles quietly queried, will a block do? Maybe a dynamic block (just a line) with a field maybe.
Dynamic blocks don't have to be complicated. Just a line with a stretch pair and the field attached to the line length.
2 cents.
Regards,
DJ
I was thinking along those lines but each would have to be Stretched to length. Not sure this would be easier
I do much the same now with Copy and Extend to acheive what the OP has drawn but putting the length at each is the issue.
Maybe a Dimstyle that had these parameters? One by one by one by...
Though with the Dynamic Block and Attrib you could output the info to a file.
Regards, Charles Shade
CSHADEDESIGN | AUTOCAD LT | LT-KB | DYNAMIC BLOCKS
Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
The DIMLINEAR macro modified to use DIMALIGNED instead that I posted is the quickest way to do what you seek: assuming you got what I meant by you don't need to click four times to get a single dimension, just two.
Yes, I use the DIMALIGNED with a DIMSTYLE to factor in the roof pitch....and yes two clicks per line....that's what I need to automate.....two clicks per line times the number of lines I have....for the birds.....
Thanks
My first macro above (read the description that went with it):
*^C^C_dimlinear;;\\
The second (untested):
*^C^C_dimaligned;;\\
There are many youtube videos to show you how to create macros in CUI command. help yourself.
Just need a way to select the lines I need to put the DIMALIGNED on and have it do all the lines selected. I just don't want to pay 5-6 Grand for this little feature in a LISP program in full AutoCAD.....surely there is way in LT.....LT has come a long way.....maybe a DIESEL expression in macro somehow?
DIESEL is listed in HELP in LT2012, explore it yourself and find out what it can and cannot do, plus these:
http://thecadprogcp.blogspot.com/2009/10/diesel-programming-in-autocad-lt.html
http://www.upfrontezine.com/tailor/tailor17.htm
http://www.crlf.de/Dokumente/Diesel/Diesel5.html
You can wait for others to jump in if there are other ideas.
You mention scripts and macro's using diesel so I take it you are happy with how they work and how to put them to use.
This isn't a fully working option, but hopefully will give you a starting point. It works with one click but does need some preparation.
You need to split your areas into separate polylines and rotate them to horizontal, the attached drawing shows you what I mean.
Also in the drawing are 2 text items one is a script, copy the text into notepad and save it with the name "dim.scr", make sure this file is saved into your support path or add the path in autocad options. The second text item is a macro listing which you can copy into a toolpalette.
When the script and macro are in place, click on the toolpalette for the macro, it will ask you to specify a point, the point should be the bottom left hand corner of a polyline, the polyline will move be dimensioned and be shown at your cursor to be placed somewhere in your drawing.
Couple of points to look for, the rectangle needs to remain clear, and the polyline needs to have a lower left corner as the extreme limit (for example item 5 at the top of the drawing wont work and would need mirroring). And some items will need the dims to have additional trimming where the top overhangs the base (e.g.. item 4).
There are a number of ways this could be improved and adapted, so play with it see what it does, and adapt