Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding layer property to an object label through an expression?

4 REPLIES 4
Reply
Message 1 of 5
CADvisers
490 Views, 4 Replies

Adding layer property to an object label through an expression?

Anyone have a solution to extract the layer of an object through an expression to include in a general segment label style?

 

I want to basically have a label style that recognizes the layer that a simple line exists on, and labels the line using a segment label style. 

Similar to an Mtext field using the object properties.

Jonathan Stewart
CADvisers
P.O. Box 7811
Lancaster, PA 17604
Ph. 717-468-3111


4 REPLIES 4
Message 2 of 5
Daniel.Du
in reply to: CADvisers

Hi,

 

It seems this is product related question, could you please confirm that you want to do it with product itself or by programming with API?



Daniel Du
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
stacy.dunn
in reply to: CADvisers

Jonathan,

There is nothing built-in that will let you assign a label style based on the layer of the object you are labeling.

 

That being said, the end result could be done in a couple of ways using code.

 

Stacy

Stacy Dunn
Message 4 of 5
Daniel.Du
in reply to: CADvisers

Still not quite clear about your requirement, but you may want to look at Civil 3D API about label styles: 

 

http://docs.autodesk.com/CIV3D/2014/ENU/Developers_Guide/index.html

 

Please elaberate on your questions so that we can give more specific information.

 

Thanks,

Daniel 

 

 



Daniel Du
Developer Technical Services
Autodesk Developer Network

Message 5 of 5

I know I'd want to the ability to have an expression to set the visibility of components based on the properties of the object being labeled. This would greatly reduce the number of styles I would need to have in a drawing. For example lets say use feature lines to design gradings on layer GR and pipes as feature lines on layer PIPE. I'd want my grade label to read 2% and my pipe label to read S=0.02. In this case I have to think, and I hate thinking about mundane things like this, and have to utilize two label styles. If I'm able to toggle based on properties I'd be able to have both components in one label and have them automatically determine which one should be shown.

 

While this could be solved programattically I'd prefer Autodesk provide the functionality in the product.

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report