RVTDocs.com
Namespace: Autodesk.Revit.DB Class: Parameter

Set

Method
Description:
Sets the parameter to a new string of text.
Remarks:
You should only use this method if the StorageType property reports the type of the parameter as a String.
Syntax
public bool Set(
	string value
)
Examples
void AddInstanceComment(Wall wall)
{
    // Get the comment parameter of the element instance
    Parameter commentPara = wall.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS);
    if (null != commentPara)
    {
        // Add a greeting string to the comment
        commentPara.Set("Hello Everyone.");
    }
}
Parameters
Parameter Type Description
value System.StringThe new text value to which the parameter is to be set.
Return Value
Type Description
Autodesk.Revit.Exceptions.InvalidOperationException The Set method will return True if the parameter was successfully set to the new value, otherwise false.
Exceptions
Exception Condition
Autodesk.Revit.Exceptions.InvalidOperationException The parameter is read-only.