NX Open C++ Reference Guide
|
Represents an expression. More...
Public Types | |
enum | UnitsOption { UnitsOptionBase, UnitsOptionExpression } |
Indicates the units to use when getting an expression's value. More... | |
Public Member Functions | |
bool | BooleanValue () |
Returns the boolean value of the expression. | |
NXString | Description () |
Returns the description of the expression. | |
void | EditComment (const NXString &newComment) |
Changes the comment. | |
NXString | Equation () |
Returns the equation of the expression in the form: name = right_hand_side. | |
NXString | GetDescriptor () |
Returns the descriptor for the expression, or NULL if there is no descriptor. | |
NXOpen::Features::Feature * | GetOwningFeature () |
Returns the feature that created the supplied expression. | |
NXOpen::Features::Feature * | GetOwningRpoFeature () |
Returns the feature whose rpo_transform created the supplied positioning dimension expression. | |
std::vector< NXOpen::Expression * > | GetReferencingExpressions () |
Returns all the referencing expressions of the expression. | |
std::vector < NXOpen::Features::Feature * > | GetUsingFeatures () |
Returns an array of the features that use the supplied expression. | |
double | GetValueUsingUnits (NXOpen::Expression::UnitsOption unitsOption) |
Get the value of the expression, in either base units or the expression's units. | |
int | IntegerValue () |
Returns the integer value of the expression. | |
bool | IsGeometricExpression () |
Returns whether the expression is a geometric expression. | |
bool | IsMeasurementExpression () |
Returns whether the expression is owned by a measurement. | |
bool | IsUserLocked () |
Returns whether the expression is user locked. | |
NXOpen::Point3d | PointValue () |
Returns the point value of the expression. | |
NXString | RightHandSide () |
Returns the right hand side of the expression. | |
void | SetRightHandSide (const NXString &rightHandSide) |
Sets the right hand side of the expression. | |
void | SetUnits (NXOpen::Unit *unitType) |
Sets the units for the expression. | |
void | SetUserLocked (bool isLocked) |
Sets whether the expression is user locked. | |
void | SetValue (double expressionValue) |
Sets the value of the expression in base units. | |
NXString | StringValue () |
Returns the string value of the expression. | |
NXString | Type () |
Returns the type of the expression. | |
NXOpen::Unit * | Units () |
Returns the units for the expression. | |
double | Value () |
Returns the value of the expression in base units. | |
NXOpen::Vector3d | VectorValue () |
Returns the vector value of the expression. |
Represents an expression.
To create a new instance of this class, use ExpressionCollection::CreateWithUnits
Created in NX3.0.0.
bool NXOpen::Expression::BooleanValue | ( | ) |
Returns the boolean value of the expression.
This must only be used on boolean expressions.
Created in NX6.0.0.
License requirements : None
Returns the description of the expression.
Created in NX5.0.2.
License requirements : None
void NXOpen::Expression::EditComment | ( | const NXString & | newComment | ) |
Changes the comment.
Created in NX4.0.0.
License requirements : None
newComment | comment |
Returns the equation of the expression in the form: name = right_hand_side.
Created in NX3.0.0.
License requirements : None
Returns the descriptor for the expression, or NULL if there is no descriptor.
Currently, only feature expressions have descriptors.
Returns the feature that created the supplied expression.
This is the feature that created it during feature creation. For example, the expression "p0 = x" is owned by feature "BLOCK(0)".
This works with both normal expressions and expressions created by the geometric expression feature.
Returns the feature whose rpo_transform created the supplied positioning dimension expression.
This is the feature that created it during positioning the feature. For example, the expression "p0 = x" is owned by the Transform of feature "Boss(2)".
This works with expressions created by the feature with rpo.
std::vector<NXOpen::Expression *> NXOpen::Expression::GetReferencingExpressions | ( | ) |
Returns all the referencing expressions of the expression.
std::vector<NXOpen::Features::Feature *> NXOpen::Expression::GetUsingFeatures | ( | ) |
Returns an array of the features that use the supplied expression.
double NXOpen::Expression::GetValueUsingUnits | ( | NXOpen::Expression::UnitsOption | unitsOption | ) |
Get the value of the expression, in either base units or the expression's units.
This method must only be used on number expressions.
unitsOption | use base units or expression units |
int NXOpen::Expression::IntegerValue | ( | ) |
Returns the integer value of the expression.
This must only be used on integer expressions.
Created in NX6.0.0.
License requirements : None
Returns whether the expression is a geometric expression.
Created in NX4.0.0.
License requirements : None
Returns whether the expression is owned by a measurement.
Created in NX5.0.0.
License requirements : None
bool NXOpen::Expression::IsUserLocked | ( | ) |
Returns whether the expression is user locked.
If this property is false, then the expression can be over-ridden from another part. (This is the default state for newly created expressions.) If this property is true, you are not allowed to over-ride it.
Note that if an expression is currently over-ridden, you cannot set its lock property. In this instance, an exception will be thrown.
Created in NX4.0.0.
License requirements : None
Returns the point value of the expression.
This must only be used on point expressions.
Created in NX6.0.0.
License requirements : None
Returns the right hand side of the expression.
When setting the property, changes are not applied to the system until Update::DoUpdate is called
Created in NX3.0.0.
License requirements : None
void NXOpen::Expression::SetRightHandSide | ( | const NXString & | rightHandSide | ) |
Sets the right hand side of the expression.
When setting the property, changes are not applied to the system until Update::DoUpdate is called
Created in NX3.0.0.
License requirements : None
rightHandSide | right hand side |
void NXOpen::Expression::SetUnits | ( | NXOpen::Unit * | unitType | ) |
Sets the units for the expression.
This must only be used on number expressions.
Created in NX5.0.0.
License requirements : None
unitType | unit type |
void NXOpen::Expression::SetUserLocked | ( | bool | isLocked | ) |
Sets whether the expression is user locked.
If this property is false, then the expression can be over-ridden from another part. (This is the default state for newly created expressions.) If this property is true, you are not allowed to over-ride it.
Note that if an expression is currently over-ridden, you cannot set its lock property. In this instance, an exception will be thrown.
Created in NX4.0.0.
License requirements : None
isLocked | is locked |
void NXOpen::Expression::SetValue | ( | double | expressionValue | ) |
Sets the value of the expression in base units.
This method must only be used on number expressions. When setting the value, any formula in the expression is replaced by a numeric value, even if the value is the same as the value that the formula evaluates to.
Created in NX6.0.1.
License requirements : None
expressionValue | expressionvalue |
Returns the string value of the expression.
This must only be used on string expressions.
Created in NX5.0.0.
License requirements : None
Returns the type of the expression.
Created in NX5.0.0.
License requirements : None
Returns the units for the expression.
This must only be used on number expressions.
Created in NX4.0.0.
License requirements : None
double NXOpen::Expression::Value | ( | ) |
Returns the value of the expression in base units.
This method must only be used on number expressions. When setting the value, any formula in the expression is replaced by a numeric value, even if the value is the same as the value that the formula evaluates to.
Created in NX3.0.0.
License requirements : None
Returns the vector value of the expression.
This must only be used on vector expressions.
Created in NX6.0.0.
License requirements : None