Sets the offset of the analytical model at end.
Namespace: Autodesk.Revit.DB.StructureAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since:
2011
Syntax
Examples
CopyC#
AnalyticalModel model = familyInstance.GetAnalyticalModel();
Curve curve = model.GetCurve();
XYZ tangentDirection0 = curve.ComputeDerivatives(0, true).BasisX.Normalize().Negate();
XYZ tangentDirection1 = curve.ComputeDerivatives(1, true).BasisX.Normalize();
model.SetOffset(AnalyticalElementSelector.StartOrBase, tangentDirection0);
model.SetOffset(AnalyticalElementSelector.EndOrTop, tangentDirection1);
CopyVB.NET
Dim model As AnalyticalModel = familyInstance.GetAnalyticalModel()
Dim curve As Curve = model.GetCurve()
Dim tangentDirection0 As XYZ = curve.ComputeDerivatives(0, True).BasisX.Normalize().Negate()
Dim tangentDirection1 As XYZ = curve.ComputeDerivatives(1, True).BasisX.Normalize()
model.SetOffset(AnalyticalElementSelector.StartOrBase, tangentDirection0)
model.SetOffset(AnalyticalElementSelector.EndOrTop, tangentDirection1)
Exceptions
See Also