Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trying to figure out how to get a fabricated part's transform applied to a family instance

0 REPLIES 0
Reply
Message 1 of 1
MEPUtilities
151 Views, 0 Replies

Trying to figure out how to get a fabricated part's transform applied to a family instance

I've been bashing my head against the wall for a while now trying to figure this out, and I've kind of run into a wall at this point. I don't often use forums, but maybe I'll be lucky and someone can get back to me on this sooner than later.

 

So here's my problem. I have a straight fabricated part and I place an instance of a family on the center line of the fab part. This is all working just fine and placement isn't an issue. However, I want my family instance to be placed as rotated along with the fab part. In this instance I need to roll the instance, though I would also like to get any ideas on how to do something similar for pitch and yaw situations if possible to get a good system of pulling these angles. I just need the angles so that I can use the element.location.rotate to rotate the instance.

 

The data I have to work with is the transform information from the fab part. So I have basis and origin information. I just can't seem to figure out how to get a consistent roll angle out of the information. Using OfVector, AngleTo, and at times AngleOnPlaneTo, I get various information sometimes things that seem to solve my issue in one of the directions. But as the fab part is rotated towards North, tilted up, or pointed straight up, that roll angle changes even though it should be constant and I don't know how to figure it out. 3D graphics and matrixes are one of my weaknesses when it comes to these kinds of things.

 

If anyone has any ideas on how to get this information, I'd love to hear it

Labels (4)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report