Label Style Text Component Editor

Label Style Text Component Editor

CADUSER2009
Participant Participant
705 Views
7 Replies
Message 1 of 8

Label Style Text Component Editor

CADUSER2009
Participant
Participant

Does anyone know if "Justification" in the Text Component Editor has been exposed in .NET? I can't find a method for it. See attached screen grab.Screen grab.jpg

0 Likes
706 Views
7 Replies
Replies (7)
Message 2 of 8

augusto.goncalves
Alumni
Alumni
What about Text Attachment property?

LabelStyleTextComponent.Text.Attachment.Value
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 3 of 8

CADUSER2009
Participant
Participant

Thanks for the reply Augusto. I did try that, but it changes the alignment of the text attachment not the justification of the text itself. See screen grab below. It's a real head scratcher.Screen grab2.jpg

0 Likes
Message 4 of 8

augusto.goncalves
Alumni
Alumni
Indeed, you're correct.

Now each Label has a SubEntity property that returns a collection, each subentity has a SetTextComponentJustificationOverride that could work. I'll only have time to try it tomorrow... in case you can try it earlier.
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes
Message 5 of 8

CADUSER2009
Participant
Participant

Thanks Augusto. I've given that a go as well. If I remember correctly I could only apply "SetTextComponentJustificationOverride" on an instance of a CogoPoint not the PointLabelStyle as a whole. But it was a week ago so I might be wrong. Give it a go. I might have missed something. Thanks mate.

0 Likes
Message 6 of 8

Civil3DReminders_com
Mentor
Mentor

I think the last time I looked at it Civil 3D used the mtext codes for that, but I could be wrong.

http://www.cadforum.cz/cadforum_en/text-formatting-codes-in-mtext-objects-tip8640

 

It was either that or Civil 3D used them when added to the label. 

Civil Reminders
http://blog.civil3dreminders.com/
http://www.CivilReminders.com/
Alumni
0 Likes
Message 7 of 8

CADUSER2009
Participant
Participant

Hehe. I tried that as well. Thats how I got multiline to work with the "\P" control key. But the alignment "\A" control key doesn't work. Even if it did, it controls the vertical alignment (bottom, center, top) not horizontal alignment (left, center, right). I get the feeling this hasn't been exposed in .NET yet. Ta.

0 Likes
Message 8 of 8

augusto.goncalves
Alumni
Alumni
Indeed, no luck with this SetTextComponentJustication... sorry.
Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
0 Likes