Text alignments

Text alignments

Anonymous
Not applicable
1,075 Views
4 Replies
Message 1 of 5

Text alignments

Anonymous
Not applicable

Hi all,

 

In Revit 2016 I used the following to create a textnote:

 

TextNote tn = sheet.Document.Create.NewTextNote(sheet, pos, XYZ.BasisX, XYZ.BasisY, bbox.Max.X - bbox.Min.X, align, res)

 

This has become obsolete in 2017 and now I must use:

 

TextNote tn = TextNote.Create(sheet.Document, sheet.Id, pos, bbox.Max.X - bbox.Min.X, res, tnOptions);

 

Problem is,the tnOptions only has a handle for horizontal alignment. Where is the vertical alignment ?? And how can I set the BaseVec and UpVec ? Prior in the class TextAlignFlags.

 

 

 

0 Likes
Accepted solutions (1)
1,076 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Property VerticalAlignment in class TextElement was introduced started with Revit 2016,but it's READONLY even in 2017.
Yes. vertical alignment was dropped out.

temporarily I just added Y asix to achieve this alignment-like
I hope there's a solution in next update.
0 Likes
Message 3 of 5

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Remy and Enonrick,

 

Thank you for your query and update.

 

This is a well-known and intentional change introduced in the Revit 2016 API.

 

Afaik, the vertical alignment possibility should never have been implemented.

 

Arnost explained it in detail in this discussion thread on creating a textnote with the 2016 API changes:

 

http://forums.autodesk.com/t5/revit-api/creating-a-textnote-with-the-2016-api-changes/m-p/5629284

 

Please also refer to the comments by David Rushforth on What's New in the Revit 2016 API:

 

http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html

I hope this helps.

 

For future reference, please let us know how you end up resolving this.

 

Thank you!

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 4 of 5

Anonymous
Not applicable

Dear Jeremy

 

thanks for replied.

 

In my cases,I purposed to output some "Marker" in Drafting View which is a number in circle presented by attachment.

Without Vertical Alignment,I need to adjust Y axis to comply the RIGHT POSITION especially in a variety of font sizes.

 

Does it have good approach to do this better?

 

Regards,

Rick

0 Likes
Message 5 of 5

Anonymous
Not applicable
thanx jeremy, it's funny I never noticed this in 2016 🙂
0 Likes