Why do you use GetTotalTransform?

Why do you use GetTotalTransform?

architect.bim
Collaborator Collaborator
1,490 Views
2 Replies
Message 1 of 3

Why do you use GetTotalTransform?

architect.bim
Collaborator
Collaborator

Hi everybody!

I just want to figure out one thing about GetTotalTransform method: why is everybody using it?! 😆 There are many code examples on our forum and other sources which demonstrate the use of that method with RevitLinkIntances and FamilyInstances. And people say that if you want to get Transform which includes the true north - use that method. But what I actually see that in many cases there is no actual need to use particulary that method as GetTransform returns the same result. It seems that both of these methods include true north when applied to FamilyInstances and RevitLinkIntances.

 

If you look into documentation it says:

"Gets the total transform, which includes the true north transform for instances like import instances. For most of other instances, it simply returns the inherent transform."

 

What are "instances like import instances"? Only ImportInstance objects? If so what's the purpose of using GetTotalTransform with RevitLinkIntances and FamilyInstances? I would be very grateful if someone could clarify this to me or share a real case in which GetTransform and GetTotalTransform return different results.

Thanks in advance!


Maxim Stepannikov | Architect, BIM Manager, Instructor
0 Likes
1,491 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Thank you for an interesting question. I cannot tell, lacking personal experience and suitable test models. I hope someone can clarify. When in doubt, always test, and always implement unit tests to ensure that your assumptions are and continue to remain valid.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3

joshua.lumley
Advocate
Advocate

Perhaps it means when the instance is in a linked file GetTransform returns what it is inside the linked file. GetTotalTransform incorporates the transform of the linked file if was moved or rotated.

(sorry no example...so this could be wrong).

0 Likes