Hello Jeremy,
thanks, for the info, I am aware of Quaternions and have used them in the past. Yes they are powerful as a compact way of writing the Transformation Matrix. But they are not the reason why I am not making headway.
I have a Routine which implements the rotations, and it works successfully with a simple adaptive tunnel ring.
The Problem is that these Rotation mechanisms do not work with FamilyInstance of an ordinary Family, because there are constraints in Revit which hinter rotations of a FamilyInstance about all 3 axes. This is where I am currently stuck. When I try to rotate a FamilyInstance obtained from the template "Metric Generic Model.rft", the "Always vertical" constraint is checked. so when I try to rotate the ring with this constraint checked, it does not react.
When I uncheck the constraint using
doc.OwnerFamily.get_Parameter(BuiltInParameter.FAMILY_ALWAYS_VERTICAL).Set(0);
the Rotation fails with the message
"Elements cannot be turned into this Position"
I do not understand what this message means. I've looked at the ring with a CAD Operator. He managed to turn the ring in the Family Editor, but could not do so as a FamilyInstance in a project. It then says that the ring is locked. What does that mean?
The other Option would be to generate the ring as an Adaptive Family using the "Metric Generic Model Adaptive.rft" template. But that template does not allow constructs such as Revolution elements.
So either way I am stuck.
dirk