Adds a Expression by specifying the name and expression string.
public Expression Add( string name, string description, string expression )
Public Function Add ( name As String, description As String, expression As String ) As Expression
public: Expression^ Add( String^ name, String^ description, String^ expression )
| Exception | Condition |
|---|---|
| ArgumentException | Throw when the expression is not valid. |
1var db = HostApplicationServices.WorkingDatabase; 2var expressionColl = CivilDocument.GetCivilDocument(db).Styles.LabelStyles.ParcelLabelStyles.AreaLabelStyles.Expressions; 3var customExpression1 = expressionColl.Add("NewExpression", "SomeDescription", "{Drawing Scale Conversion}*100.0"); 4var customExpression2 = expressionColl.Add("NewExpression2", "SomeDescription2", $"{customExpression1.ReferenceString}>6.0");