Revit 2017 API - ElementTransformUtils.RotateElement is very slow

Revit 2017 API - ElementTransformUtils.RotateElement is very slow

mahmouds12
Participant Participant
839 Views
2 Replies
Message 1 of 3

Revit 2017 API - ElementTransformUtils.RotateElement is very slow

mahmouds12
Participant
Participant

Hello all,

I am creating a Revit 2017 plugin in which I use "ElementTransformUtils.RotateElement()" to rotate a lot of Revit Elements
The problem is that this method sometimes takes more than 1000ms for each element on a high performance pc... and when creating 100s of elements, this will make the overall process very slow

 

First Question: Why does this method takes a lot of time?
Second Question: Is there an alternative or a work around to rotate any element without using "ElementTransformUtils.RotateElement()"?

 

Thanks

0 Likes
840 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

hard too say with this less information. I recall having a kind of simular case, where the preformance was speeded up by not doing a transaction for each rotation, but group things within one transaction. But I know sometimes the code doesn't allow that.

 

Message 3 of 3

Revitalizer
Advisor
Advisor