Share

AssocVariable Class

Description

AssocVariable keeps a name, value and expression. The name is an arbitrary non-empty string but the client code sets rules that define valid variable names.

The expression is optional and is in the form of a string. An evaluator id needs to be provided with each espression. It specifies which expression evaluator should be used to parse the expression. The expression can reference other objects that provide values, such as it can reference other variables. The AssocVariable then owns AssocValueDependencies on these referenced objects. If the expression string is empty, or if the expression string does not reference other objects, the variable is a constant.

The variable value is a scalar value such as a double, int, point, or a string. Currently only these four value types are supported.

AssocVariable exposes AssocVariableValueProviderPE protocol extension that is used by other variables and generally by other actions that own AssocValueDependencies to obtain the value of the variable.

The Evaluate() method of the variable evaluates the expression using the current values of the referenced symbols and sets the evaluated value.

Class Hierarchy

Autodesk.AutoCAD.DatabaseServices.DBObject
    Autodesk.AutoCAD.DatabaseServices.AssocAction
        Autodesk.AutoCAD.DatabaseServices.AssocVariable

Visual Basic

Public Class AssocVariable
Inherits AssocAction

C#

public class AssocVariable : AssocAction;

Links

AssocVariable Methods, AssocVariable Properties

Was this information helpful?