How to change the orientation of family placed on the plane

Hi everyone
I know there are many posts on the forum relating to placing and rotating, but I haven’t been able to find one pertaining to my situation.
I tried placing the bolt family on the tunnel segment, I used dynamo’s FamilyInstance.ByFace node to do this

However, the angle of the placed family does not match the angle I expect.I tried changing the referencedirection parameter of the FamilyInstance.ByFace node, but changing this parameter didn’t make any changes to the angle of the resulting family

The following is a schematic diagram of the generated family in the wrong direction

Below is a schematic of the angle I want the bolt family to be placed at

I would like to know how to place the bolt family at the correct angle, or how to rotate it based on the wrong angle to get the bolt family to the correct angle

If someone could help me with this I would be grateful!

Hello @GRE_Sinae and welcome
can you share your family ?, but I think your family should rather be modeled like this (reference face on the screw head)

thanks,this is my family

螺栓1.rfa (392 KB)

The bolt family can be placed successfully in revit, but the angle is incorrect when placed through dynamo, so I don’t think the problem should be with the bolt family

Your family is a Non-Hosted Family (with work plane)

Are you trying with a face based Family?