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: 

Parcel Area Label Style

4 REPLIES 4
Reply
Message 1 of 5
RasmusB
331 Views, 4 Replies

Parcel Area Label Style

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

---
2B or not 2B? That is the question! The answer is FF.
4 REPLIES 4
Message 2 of 5
Partha.Sarkar
in reply to: RasmusB

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



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
RasmusB
in reply to: RasmusB

Hi Partha,

 

Thanks for answering. Enclosed please find an archive with screenshots..I hope they explain the issue.

---
2B or not 2B? That is the question! The answer is FF.
Message 4 of 5
Partha.Sarkar
in reply to: RasmusB

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



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
RasmusB
in reply to: RasmusB

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

---
2B or not 2B? That is the question! The answer is FF.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report