M

AnalyticalModel.SetOffset

Description:
Sets the offset of the analytical model at end.
public void SetOffset(
	AnalyticalElementSelector selector,
	XYZ offset
)
// extend the analytical model by 1 foot at each end. Direction of offset is parallel to the analytical model curve.
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);