Matching Link Element Orientation

Hey all,

I’m attempting to get plumbing fixtures from a linked model, place a group instance at that element’s location and match the element’s orientation. I’ve gotten most of the way, but can’t seem to match the orientation. I’ve tried getting the rotation of the element and setting my group instances to that, but that doesn’t work how I am wanting it to. Below is a screenshot of my current script without the rotation. Does anyone have any ideas how I could match the orientation of the fixture? Thanks