Coordinate issue with CreateNewDimension using Revit API with C#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am developing an add-in that creates dimensions for a viewsheet. I need to ensure that the dimension text position does not intersect with the dimension segments (which may consist of one or multiple segments). However, when I checked this using the code below, I encountered exceptions for certain properties of the dimension objects (such as leader end position, origin, and text position), though the dimensions were successfully created.
Dimension dimTB = doc.Create.NewDimension(dim.view, dim.Line, dim.References, dim.DimensionType);
I also attempted to retrieve the above properties after committing the transaction, but I am still encountering the same exception issue.
My goal is to create dimensions for different views in a way that ensures they are neat and easily readable for the user, meaning there should be no intersections.
The above after creating the dimension using the above line of code.
and this is the goal to do after or while creating the dimension for the viewsheet.
Please provide me what could be the best solution for this. Thanks in advance.