[AutoCAD MEP 2022] Is it possible to have tags inherit pipe system colors?

[AutoCAD MEP 2022] Is it possible to have tags inherit pipe system colors?

r.govea
Contributor Contributor
721 Views
7 Replies
Message 1 of 8

[AutoCAD MEP 2022] Is it possible to have tags inherit pipe system colors?

r.govea
Contributor
Contributor

Is it possible to have custom tags inherit the same layer from various pipe system definitions?

Ideally, I would like the tag to exist on the tool palette and have the user generate a tag with the correct info by clicking on a pipe or duct, but have it automatically inherit the layer as well.  Can this be done? 

Can the same be done with Dimension lines? 

 

If it is possible, is anyone able to point me in the right direction on learning how to do this?  If someone already knows, I'd be more than happy to compensate (though learning it would be more useful)..

0 Likes
Accepted solutions (2)
722 Views
7 Replies
Replies (7)
Message 2 of 8

Sea-Haven
Mentor
Mentor

Post a dwg showing what you wnat but not all of us have MEP.

0 Likes
Message 3 of 8

r.govea
Contributor
Contributor

OK!  I uploaded a drawing.

 

Upon opening, you'll see that I have a pipe, a dimension, & a bottom of pipe tag anchored to the pipe.  

What I am looking for is to have the tag automatically inherit the layer / color of the pipe itself.

I am also curious to explore whether I can do this with dimensions as well.

 

A plus would be if an override could be implemented on these tags in case I need to isolate various systems and not need to re-create tags, dimensions, etc.  

0 Likes
Message 4 of 8

Sea-Haven
Mentor
Mentor

The pipe is a proxy object but can get at layer & color so yes could be done. Just not sure about automating it as dont have MEP

0 Likes
Message 5 of 8

r.govea
Contributor
Contributor

The automation is what I was looking for.  I was hoping for someone familiar with lisp (or other programming) that had worked on similar topics like this before and could point me in the right direction.  OR I would even pay someone for its development.  

0 Likes
Message 6 of 8

Sea-Haven
Mentor
Mentor

Getting the layer is easy (setvar 'clayer (cdr (assoc 8 (entget (car (entsel "\npick object")))))) when you say tag is it part of MEP ? Depending on how this command works you may be able to pass the selected entity to the command.

 

Post the command sequence of a TAG.

0 Likes
Message 7 of 8

andkal
Collaborator
Collaborator
Accepted solution

Hi
What you wrote you need can be done with Lisp. Alternatively, if you have a Tag or a Label that already has the properties you want, you can use Addselected plugin. It works with autocad mep objects.
http://autolisps.blogspot.com/p/addselected.html
I use it a lot when I want a new simillar object to have the same properties like some other existing objects.


• www.autolisps.blogspot.com - Productivity plugins for Autocad and Autocad MEP
• Autodesk AppStore
0 Likes
Message 8 of 8

r.govea
Contributor
Contributor
Accepted solution

It looks interesting, but I need the tag to be created with the information I need AND receive the layer the pipe is on.

The tag and information is something I've done on my own as tag creation is straight forward.  I just have no idea how to write a lisp that would force the tag to inherit the layer as well.  If anyone knows how to do this, I would greatly appreciate it.  Out of curiosity, is the linked example something I buy?  Would the code come with it?  I'm wondering if that is a good example to study.

0 Likes