A bug in the new DimensionSegment.TextPosition property

UPDATE: This is fixed in Revit 2017

The Revit Sundial API enhancements, at least some of which are included in the current R2015 update, includes the new DimensionSegment.TextPosition property. Unfortunately, it incorrectly outputs the same position for all segments of a dimension. Autodesk is aware of the problem and hopefully it will be fixed soon.

unnamed

Document doc = this.ActiveUIDocument.Document;
UIDocument uidoc = this.ActiveUIDocument;
Dimension dim = doc.GetElement(uidoc.Selection.PickObject(ObjectType.Element)) as Dimension;
string d = "";
foreach (DimensionSegment dimseg in dim.Segments)
{
   d += dimseg.Value + Environment.NewLine + dimseg.TextPosition + Environment.NewLine + Environment.NewLine;
}
TaskDialog.Show("d",d);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s