Revit 2026 API
Spatial |
Creates empty analysis results primitive associated with a curve and a transform.
Namespace: Autodesk.Revit.DB.Analysis
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public int AddSpatialFieldPrimitive( Curve curve, Transform trf )
Public Function AddSpatialFieldPrimitive ( curve As Curve, trf As Transform ) As Integer
public: int AddSpatialFieldPrimitive( Curve^ curve, Transform^ trf )
member AddSpatialFieldPrimitive : curve : Curve * trf : Transform -> int
Parameters
- curve Curve
- Curve to be associated with the primitive. %curve% does NOT correspond to actual Revit geometry, i.e. it cannot be associated with reference; otherwise the other overload of the method must be used (taking "reference" as the input)
- trf Transform
- Conformal Transform to be applied to %curve%.
Return Value
Int32Unique index of primitive for future references

Exception | Condition |
---|---|
ArgumentException | The input curve points to a helical curve and is not supported for this operation. -or- Argument trf is not a conformal transform (see property Revit::DB::Transform::IsConformal) |
ArgumentNullException | A non-optional argument was null |
See Also