SpatialFieldManagerRegisterResult Method |
Registers result and assigns it a unique result index
Namespace: Autodesk.Revit.DB.AnalysisAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic int RegisterResult(
AnalysisResultSchema resultSchema
)
Public Function RegisterResult (
resultSchema As AnalysisResultSchema
) As Integer
public:
int RegisterResult(
AnalysisResultSchema^ resultSchema
)
member RegisterResult :
resultSchema : AnalysisResultSchema -> int Parameters
- resultSchema AnalysisResultSchema
-
Result schema to be registered
Return Value
Int32
Unique index assigned to the result
Exceptions
Example
IList<int> registeredResults = new List<int>();
AnalysisResultSchema resultSchema = new AnalysisResultSchema("Reactions", "Reaction Forces at Column Base");
registeredResults = spatialFieldManager.GetRegisteredResults();
int resultIndex = 999;
foreach (int myInt in registeredResults)
{
if (spatialFieldManager.GetResultSchema(myInt).Name == "Reactions")
{
resultIndex = myInt;
break;
}
}
if (resultIndex == 999)
resultIndex = spatialFieldManager.RegisterResult(resultSchema);
See Also