Jump to content

Hello and help! - material tag


Recommended Posts

Posted

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!

Posted

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! :P

TKTAG.lsp

Posted

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);

Posted

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...

Posted

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;

Posted

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;;

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...