razorangel Posted September 23, 2008 Posted September 23, 2008 First I want to say how awesome I think these forums are! It's nice to know there are so many helpful and intelligent people out there. My hope is to get some help with my project for my work. Basically, I have built a macro for a custom toolbar which will insert a block (Material Tag) into a drawing. I'd like to have an alternate button to draw a line, the first point being user specified, the second point will be also user specified, but will be where that block (which is a circle with text in the center) is inserted, and then trim out the line from the center of the line. Basically it's to have a material tag with a line leader attached to it. Whether it groups them together at the end or not, is no biggie, but if it can also put the two entities into an unnamed group together, that'd be awesome. I hope I'm not asking for too much, but my search of Google has been fairly unfruitful. Thanks again in advance! Quote
Lee Mac Posted September 23, 2008 Posted September 23, 2008 Hi Razorangel, Just a quick reply, after reading your post, this LISP may have something like what are looking for. Let me know if it helps! TKTAG.lsp Quote
razorangel Posted September 23, 2008 Author Posted September 23, 2008 Lee Mac, Thanks so much for your reply, but I think I've NEARLY got it down using just macro commands. All that's not happening is the trimming of the line, and the grouping together of the line and mtag block. Here, lemme show you. ^C^C_line;\\;_-insert;"N:/Piping Group/_BLOCKS/2d/Toolbar/Mtag.dwg";$m=$(getvar,lastpoint);1;;;\_trim;;$m=$(getvar,lastpoint); Quote
razorangel Posted September 23, 2008 Author Posted September 23, 2008 I'm still trying to get it to trim the line from the inside of the circle, but am having no luck. Any ideas? Also, I would like to include in my macro, a grouping for the drawn entities... Quote
razorangel Posted September 23, 2008 Author Posted September 23, 2008 Okay! Nearly got it! I've borrowed some code from a different thread, but I don't like the zooming issue. Soooo... I'm trying to figure out how to take out the zoom! Any ideas on that one? (The simple answer isn't working - if you just take out the zoom & associated commands, it just doesn't trim). ^C^C-layer m mtag;;_line;\\;_-insert;"N:/Piping Group/_BLOCKS/2d/Toolbar/Mtag.dwg";$m=$(getvar,lastpoint);1;;;\circle;$m=$(getvar,lastpoint);0.1875;(setq cc (entlast));zoom;o;l;;trim;l;;c;@-0.02,-0.02;@0.04,0.04;;erase;!cc;;zoom;p; Quote
razorangel Posted September 23, 2008 Author Posted September 23, 2008 Got it all! Woot! Well, nothing about grouping the items, but who cares? I'm just happy it's working. ^C^C-layer m mtag;;_line;\\;_-insert;"N:/Piping Group/_BLOCKS/2d/Toolbar/Mtag.dwg";$m=$(getvar,lastpoint);1;;;\circle;$m=$(getvar,lastpoint);0.1875;(setq cc (entlast));trim;l;;c;@-0.1,-0.1;@0.1,0.1;;erase;!cc;; 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.