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