RVTDocs.com
Namespace: Autodesk.Revit.DB

Parameter

Class
Description:
The parameter object contains the value data assigned to that parameter.
Remarks:
The piece of data contained within the parameter can be either a Double, Integer, String or ElementId. The parameter object can be retrieved from any Element object using either a built in id, definition object or shared parameter guid. All Elements within Autodesk Revit contain Parameters. These are options that can be accessed in a generic fashion. Revit contains many built in parameter types but users and now developers, via the API, can add their own parameters in the form of shared parameters. The developer should become familiar with the Revit user interface for added and managing parameters and shared parameters before using this API. The user interface components can be found in the following locations: Element Properties dialog, Shared Parameters dialog (available from the File menu), Project Parameters dialog (available from the Settings menu), Family Types dialog (available from the Settings menu when editing a family). There are several relationships between the objects that make up the APIs exposure of parameters. The parameter object contains the data value. Parameter objects can be retrieved from Elements if you know its built-in id, its definition or its shared parameter guid. Each parameter has a definition. New parameters can be added to Elements by adding a ParameterBinding object to the Document object.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.APIObject
    Autodesk.Revit.DB.Parameter
Syntax
public class Parameter : APIObject
Parameter Class Members:
Name Description Inherited From
Definition Returns the Definition object that describes the data type, name and other details of the parameter.
Element The element to which this parameter belongs.
GUID The Guid for a shared parameter.
HasValue Identifies if the parameter has an assigned value.
Id The id of the parameter.
IsReadOnly Get the readonly property of the parameter. (Overrides APIObject . IsReadOnly )
IsShared Identifies if the parameter is a shared parameter.
StorageType Describes the type that is used internally within the parameter to store its value.
UserModifiable Indicates whether the interactive user can modify the value of this parameter.
Name Description Inherited From
AsDouble Provides access to the double precision number within the parameter.
AsElementId Provides access to the Autodesk::Revit::DB::ElementId^ stored within the parameter.
AsInteger Provides access to the integer number within the parameter.
AssociateWithGlobalParameter Associates this parameter with a global parameter in the same document.
AsString Provides access to the string contents of the parameter.
AsValueString() Get the parameter value as a string with units.
AsValueString(FormatOptions) Get the parameter value as a string with units.
CanBeAssociatedWithGlobalParameter Tests whether this parameter can be associated with the given global parameter.
CanBeAssociatedWithGlobalParameters Tests whether this parameter can be associated with any global parameter.
ClearValue Clears the parameter to its initial value.
Dispose Causes the object to release immediately any resources it may be utilizing. (Inherited from APIObject ) APIObject
DissociateFromGlobalParameter Dissociates this parameter from a global parameter.
Equals Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
GetAssociatedGlobalParameter Returns a global parameter, if any, currently associated with this parameter.
GetHashCode Serves as the default hash function. (Inherited from Object ) Object
GetType Gets the Type of the current instance. (Inherited from Object ) Object
GetTypeId Gets the identifier of the parameter.
GetUnitTypeId Gets the identifier of the unit quantifying the parameter value.
Set(Double) Sets the parameter to a new real number value.
Set(ElementId) Sets the parameter to a new element id.
Set(Int32) Sets the parameter to a new integer value.
Set(String) Sets the parameter to a new string of text.
SetMultiple Sets multiple parameters to new values.
SetValueString Set the parameter value according to the input string.
ToString Returns a string that represents the current object. (Inherited from Object ) Object