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: 

Flip Baseline Dimension Direction

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
asa_xiao
430 Views, 7 Replies

Flip Baseline Dimension Direction

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)

asa_xiao_0-1726259320922.png


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'?

asa_xiao_1-1726259399637.png

 

7 REPLIES 7
Message 2 of 8
jeremy_tammik
in reply to: asa_xiao

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.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 8
asa_xiao
in reply to: jeremy_tammik

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).

Message 4 of 8
asa_xiao
in reply to: jeremy_tammik

Hi Jeremy,

 

have you heard back from the development team by any chance?

Message 5 of 8
jeremy_tammik
in reply to: asa_xiao

Nope, not yet. I re-prompted for you...

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 6 of 8
jeremy_tammik
in reply to: asa_xiao

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.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 7 of 8
jeremy_tammik
in reply to: asa_xiao

The ticket number is REVIT-227496. Please make a note of that for future reference. Thank you.

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 8 of 8
asa_xiao
in reply to: jeremy_tammik

Thank you Jeremy

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

Post to forums  

Autodesk Design & Make Report