Hi,
I'm trying to create baseline dimensions via Revit API. While I've successfully created the dimension, its direction is not ideal, and this is quite important for baseline dimensions. Usually when creating dimensions via the Revit GUI, the order in which elements are selected significantly impacts the resulting dimension direction. However, using the API, I found that the order of the ReferenceArray doesn't influence the dimension direction at all.
(Below is what I get if I use the API to create the baseline dimension, but I want all dimensions to reference the gridline)
So my question is, is there a way to flip dimension direction using the API, similar to selecting the dimension object and press the Spacebar, or right-clicking and choosing 'Flip Dimension Direction'?
Solved! Go to Solution.
Solved by jeremy_tammik. Go to Solution.
As you say and as the Revit online help suggest, you can use the flip controls in the user interface to change the direction:
So, it would be nice to have programmatic access to these controls. Maybe we do. Can you check the dimension properties and parameters via RevitLookup and other database exploration tools to see whether any changes are apparent via API when using the UI flip controls?
Meanwhile, I also asked the development team for you.
Hi Jeremy,
Thanks for your reply.
From what I can see, when I do the flip, the orders of the References and Segments change. However I don't see a relationship between the order of the array and order of stacking, it seems pretty random to me (ex. the first one is the one in the middle).
Nope, not yet. I re-prompted for you...
It is currently not possible to flip the baseline dimension through API, because the class BaselineLinearDimState
is not yet exposed in the public API. The devteam is thinking of doing so in a future release. Maybe you would also like to raise a wish for this in the Revit Idea Station to increase its priority.
The ticket number is REVIT-227496. Please make a note of that for future reference. Thank you.
Can't find what you're looking for? Ask the community or share your knowledge.