Class Parameter
- Namespace
- RvtIO.Model
- Assembly
- RvtIO.dll
An element parameter - mirrors the Revit API Parameter class. Value is typed according to StorageType: double, int, string, or int (ElementId).
public class ParameterInheritance
Inherited Members
Properties
ConversionFactor
Conversion factor from Revit internal units to display units. E.g. for length: feet -> mm = 304.8.
[JsonIgnore]
public double? ConversionFactor { get; set; }Property Value
Definition
Definition (name/BIP). Invariant per RvtIO.Model.Parameter.Id; hoisted into the document-level ParameterDefinitions table for JSON, so it is not serialized inline.
[JsonIgnore]
public Definition Definition { get; set; }Property Value
ForgeId
Forge TypeId string for user-defined/shared params (e.g. "autodesk.parameter.aec.revit.external.-1:GUID-1.0.0"). Invariant per definition id - lives in ParameterDefinitions.
[JsonIgnore]
public string? ForgeId { get; set; }Property Value
Guid
GUID of shared/external parameters (parsed from ForgeId). Null for built-in params. Invariant per definition id - serialized once in the document's ParameterDefinitions table.
[JsonIgnore]
public Guid? Guid { get; set; }Property Value
- Guid?
HasValue
Whether this parameter has a non-null value.
[JsonIgnore]
public bool HasValue { get; }Property Value
Id
For built-in params: the BIP enum int value (same as Definition.Id, negative). For user-defined params: the param definition element ID (positive). This is the key into the document's ParameterDefinitions table.
public int Id { get; set; }Property Value
IsApproximate
True when this parameter's value came from an approximate fallback (e.g. dominant bounding-box dimension) rather than an exact decoded source (e.g. the element's serialized location curve). Per-instance, like RvtIO.Model.Parameter.Value - not invariant per definition id. Defaults to false (exact).
[JsonIgnore]
public bool IsApproximate { get; set; }Property Value
IsReadOnly
True if the parameter is read-only (computed, system-generated, etc.). Invariant per definition id - lives in ParameterDefinitions.
[JsonIgnore]
public bool IsReadOnly { get; set; }Property Value
SpecType
Measurement spec type (e.g. "autodesk.spec.aec:length-2.0.0"). Resolved from ForgeId via 0x0B3A blocks, or from BIP name heuristics.
[JsonIgnore]
public string? SpecType { get; set; }Property Value
StorageType
Storage type. Invariant per definition id - lives in ParameterDefinitions.
[JsonIgnore]
public StorageType StorageType { get; set; }Property Value
UnitSymbol
Display unit symbol (e.g. "mm", "m^2", "degC"). Resolved from SpecType via 0x0FBD ForgeTypeId spec registry. Invariant per definition id - lives in ParameterDefinitions.
[JsonIgnore]
public string? UnitSymbol { get; set; }Property Value
Value
Typed value: double, int, string, or int (ElementId). Null when the value could not be resolved from the binary data. This is the only per-element-instance field of a parameter.
public object? Value { get; set; }Property Value
Methods
AsDouble()
Get the value as double. Returns 0 if not a Double parameter or value is null.
public double AsDouble()Returns
AsElementId()
Get the value as ElementId (int). Returns -1 (InvalidElementId) if not an ElementId parameter.
public int AsElementId()Returns
AsInteger()
Get the value as integer. Returns 0 if not an Integer parameter or value is null.
public int AsInteger()Returns
AsString()
Get the value as string. Returns null if not a String parameter.
public string? AsString()Returns
AsValueString()
Get a formatted display string for the value. Uses ForgeTypeId spec registry for precise unit conversion when available, falls back to parameter name heuristics.
public string? AsValueString()