AnalyticalModelStick

AnalyticalModelStick

Anonymous
Not applicable
558 Views
4 Replies
Message 1 of 5

AnalyticalModelStick

Anonymous
Not applicable

Hi,

In new version of Revit API in analytical model is class AnalyticalModelStick. How use this class to set proper aligment. In previous version in analytical model I use method 

SetAlignmentMethod(AnalyticalElementSelector.StartOrBase, AnalyticalDirection.Y, AnalyticalAlignmentMethod.Projection)

 

Thanks in advance

Krzysiek

 

0 Likes
Accepted solutions (1)
559 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

Dear Krzysiek,

 

A sensible place to start would be to search the Internet for "AnalyticalModelStick revit api".

 

That leads me to 

 

http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html

 

 

http://thebuildingcoder.typepad.com/blog/2015/04/whats-new-in-the-revit-2016-api.html#5.08

 

I searched for SetAlignmentMethod with little success, except to find that the old obsolete method was removed.

 

Hmm.

 

I'll pass your query on to the development team and see what they have to suggest for you.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 5

Anonymous
Not applicable
Accepted solution

I fix problem in this way 

AnalyticalModelStick stickModel = (AnalyticalModelStick)targetInstance.GetAnalyticalModel();

and then 

stickModel.SetAlignmentMethod(AnalyticalElementSelector.StartOrBase, AnalyticalAlignmentMethod.Projection);

and it looks direction is take from instance and don't need to be set now.

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk

Dear Krzysiek,

 

Thank you very much for letting us know!

 

I accordingly marked your solution as the solution 🙂

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you 🙂

0 Likes