Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Text alignments

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
R.van.den.Bor
663 Views, 4 Replies

Text alignments

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.

 

 

 

Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: R.van.den.Bor

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.
Message 3 of 5

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
in reply to: jeremytammik

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

Message 5 of 5

thanx jeremy, it's funny I never noticed this in 2016 🙂
Kind regards,
Remy van den Bor
ICN Solutions B.V.
Liked this post or found it usefull, don't forget the Kudo It won't hurt (at least not me).

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community