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.
Solved! Go to Solution.
Solved by jeremytammik. Go to 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
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