Can't orient Symbol to Family Instance

Hello, I 'm new to the forum and I’m stuck with an issue on Dynamo.
I have been developing a dynamo definition to place symbols on top of family instances. I have been able to place them on the desired location, but I need them to align to where the instance is facing. The FamilyInstance.FacingOrientation Node doesn’t seem to be doing the trick.
When I run my definition, I get the result in the picture.

I need the symbol to be aligned to the speaker… I can’t seem to figure out how to do so. I have tried retrieving their reference planes and calculating the angle between their respective surface normals, and that was the closest I got to aligning both, but sometimes the symbols are flipped.
I would attach more files, but as a new member, I am still not allowed to do so.
Any help is welcome!
Thank you :wink:

You may can try comparing the vectors from the element’s transform to the view’s up direction and use the view direction as the rotation axis. Here is a snip from a script that I created that utilizes that for view rotation matching.


I was able to rotate all items properly using the up direction reference instead the way you suggested.
Thank you very much!

You’re welcome! Glad it worked!