Rotate Element on Z axis perpendicular curve

Hi, I’m trying to rotate family instances perpendicular to a 3D curve.

The curve gets pulled from Civil3D using the CivilConnection and I can get the family instances perpendicular to the curve in plan (see images below)

The issue is getting the script to rotate the elements on the Z axis (in elevation). I know what the angle should be as I have calculated it using CoordinateSystem.ZAxis, Vector.ZAxis and Vector.AngleWithVector nodes, but I can’t get the elements to rotate.

Am I missing a step? Thanks in advance



To rotate a family in 3-axis you have to put it inside an adaptive family:

Mind that you have to use another node to place the family then.

Another method is to use a mechanical equipment family, but that never worked out for me.

Thinking out loud… could you create a reference plane based on the CAD line and then host the family on the plane?

Thanks everyone. Yes I tried just using mechanical equipment (pipe fitting) family, but that didn’t work.

I’ve nested the generic model family into an an adaptive family and added an angle parameter. I can also create a plane at each point along the curve. How can I host the family to the plane?

The FamilyInstance.ByHostAndPoint node expects the host to be a Revit element, but of course the planes only exist in Dynamo

You could try creating sketch plane from the Dynamo plane - I believe clockwork has nodes for this.

Generally speaking I would recommend utilizing an adaptive environment for this if possible as it’ll be more controlled than what you have in the project environment. This may not be possible with Civil Connector data though, at least not with some additional gymnastics.


Success!! Woohoo!! Thanks guys.

Created sketch planes and then using the FamilyInstanceByHost AndPoint node worked a treat then I could just control the instance parameter that controlled the angle in the adaptive family.

Cheers

2 Likes

If you have an adaptive family, you just need to transform to the desired coordinatesystem. It will rotate in 3 axis to the desired orientation.

If you have non adaptive families, then you have to place them on a plane.

Hi @gerhard.p,
Yes Adaptive family is he best option also from my point of view. in the above post i add link to the old post i publich adaptive family can rotat about three axsis. this family first inovated by @Andrzej_Samsonowicz and publich at his pak.

Thanks Gehard.P, can you please clarify whether this adaptive family behaviour is the same for generic model families loaded into an empty adaptive family as it is for 3D content created in an adaptive family template (by using profiles)?