NX Open C++ Reference Guide
Public Types | Public Member Functions
NXOpen::Expression Class Reference

Represents an expression. More...

Inheritance diagram for NXOpen::Expression:
NXOpen::NXObject NXOpen::TaggedObject NXOpen::INXObject

List of all members.

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::FeatureGetOwningFeature ()
 Returns the feature that created the supplied expression.
NXOpen::Features::FeatureGetOwningRpoFeature ()
 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::UnitUnits ()
 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.

Detailed Description

Represents an expression.


To create a new instance of this class, use ExpressionCollection::CreateWithUnits

Created in NX3.0.0.


Member Enumeration Documentation

Indicates the units to use when getting an expression's value.

Enumerator:
UnitsOptionBase 

Overwrite existing expressions if the imported values differ.

UnitsOptionExpression 

Don't overwrite existing expressions.

New expressions are created


Member Function Documentation

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

Parameters:
newCommentcomment

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:
Expression descriptor.
Created in NX4.0.0.

License requirements : None

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:
owning feature or NULL
Created in NX4.0.0.

License requirements : None

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.

Returns:
owning rpo feature or NULL
Created in NX7.5.0.

License requirements : None

Returns all the referencing expressions of the expression.

Returns:

Created in NX8.0.0.

License requirements : None

Returns an array of the features that use the supplied expression.

Returns:
array of features, or empty array
Created in NX4.0.0.

License requirements : None

Get the value of the expression, in either base units or the expression's units.

This method must only be used on number expressions.

Returns:

Created in NX4.0.0.

License requirements : None
Parameters:
unitsOptionuse base units or expression units

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

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

Parameters:
rightHandSideright hand side

Sets the units for the expression.

This must only be used on number expressions.
Created in NX5.0.0.

License requirements : None

Parameters:
unitTypeunit 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

Parameters:
isLockedis 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

Parameters:
expressionValueexpressionvalue

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

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


The documentation for this class was generated from the following file:
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.