Creates an empty analysis results primitive associated with a reference.
Namespace: Autodesk.Revit.DB.AnalysisAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2011
 Syntax
Syntax
| C# | 
|---|
| public int AddSpatialFieldPrimitive( Reference reference ) | 
| Visual Basic | 
|---|
| Public Function AddSpatialFieldPrimitive ( _ reference As Reference _ ) As Integer | 
| Visual C++ | 
|---|
| public: int AddSpatialFieldPrimitive( Reference^ reference ) | 
Parameters
- reference
- Type: Autodesk.Revit.DB..::..Reference
 Reference pointing to the curve or face to be associated with the primitive
Return Value
Unique index of primitive for future references Remarks
Remarks
There can be multiple primitives associated with one reference, normally they would be shown with different results. However this is justified only if they have different sets of domain points. Otherwise one primitive can be used to display values for different results.
 Exceptions
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentException | reference points to neither face nor curve | 
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL | 





