I have created a Parcel Area Label Style in code, and also added a text component to the style. The point in adding a text component was to expose a Parcel UDP on the label, but the text component does not display as expected (read: as it displays when the same thing is done in the GUI).
I set the LabelStyleTextComponent.Text.Contents.Value to the same string as I get when I add the Parcel UDP to the text component in the GUI (from the Properties-drop down in the Text Component Editor), but the label then just displays the "template", e.g. "<[My UDP(CP)]>", exactly as it shows in the Editor. When the style and text component is added through the GUI, the label correctly displays the current value of the UDP "My UDP" on the Parcel.
If I go into the Text Component Editor after having added the area label style and it's text component through code, and add the same UDP to the text component (so that it stores the UDP twice), then the label correctly displays the UDP value twice on the Parcel (!). That is, Civil then suddenly realizes it's a UDP..
Hi RasmusB,
Could you add some screenshot or capture a screencast describing this issue ?
I can investigate it after confirming I understand the issue correctly 🙂
Thanks,
Partha
ADN
Hi Partha,
Thanks for answering. Enclosed please find an archive with screenshots..I hope they explain the issue.
Hi Rasmus,
I do find the same behavior in Civil 3D 2013.
This is how I added it -
LabelStyleTextComponent component = componenetId.GetObject(OpenMode.ForWrite) as LabelStyleTextComponent;
component.Text.Contents.Value = "Custom Property: <[Custom Property(CP)]>";
And Area Label Style shown as :
Custom Property : <Custom Property>
So, I will log a CR for further investigation by our engineering team.
Thanks,
Partha
Thanks. Unfortunately the same thing seems to happen if you try to set <[Custom Property(CP)]> to the ContentStringFormatted of a ColumnStyle (in a TableStyle's ColumnStyles collection). I was planning on showing Parcel UDP values in a Parcel Table as well...