NXOpen .NET Reference Guide
|
Represents a collection of expressions. More...
Public Types | |
enum | ExportMode { WorkPart, AllInAssyTree, AllParts } |
Indicates the mode for exporting expressions. More... | |
enum | ImportMode { Replace, DontReplace, DeleteImports } |
Indicates the mode for importing expressions. More... | |
enum | SortType { AlphaNum, TimeStamp, ReverseTimeStamp } |
Indicates the mode for sorting expressions. More... | |
enum | Type { All, Attribute, Interpart, Measure, System, User, UserAndGeometry, UserExcludeSystem } |
Identifies the type of expression desired. More... | |
Public Member Functions | |
unsafe string | AskInterpartLhsName (NXOpen.Expression sourceExpression) |
Creates the left hand side name for an overriding interpart expression reference. More... | |
unsafe string | AskInterpartRhsName (NXOpen.Expression sourceExpression) |
Creates the right hand side name for an interpart expression reference. More... | |
unsafe void | ChangeInterpartReferences (string oldPartName, string newPartName) |
Changes all of the references in the part "owning_part" from expressions in the part "old_part_name" to expressions in the part "new_part_name". More... | |
unsafe void | ChangeInterpartReferences (string oldPartName, string newPartName, bool doUpdate, bool doChecking) |
Changes all of the references in the part "owning_part" from expressions in the part "old_part_name" to expressions in the part "new_part_name". More... | |
unsafe void | ChangeInterpartReferencesFor4gd (NXOpen.Assemblies.Component targetPartOccTag, string oldSourcePartName, NXOpen.Assemblies.Component newSourcePartOccTag, bool doUpdate, bool doChecking) |
Interface for collaborative design More... | |
unsafe NXOpen.Expression | Create (string @string) |
Creates an expression More... | |
unsafe NXOpen.Expression | CreateExpression (string expressionType, string @string) |
Creates an expression of the specified type. More... | |
unsafe NXOpen.InterpartExpressionsBuilder | CreateInterpartExpressionsBuilder () |
Creates interpart expressions. More... | |
unsafe NXOpen.ReplaceExpressionsBuilder | CreateReplaceExpressionsBuilder () |
Replace expressions. More... | |
unsafe NXOpen.SuppressByExpressionBuilder | CreateSuppressByExpressionBuilder () |
Creates a NXOpen.SuppressByExpressionBuilder More... | |
unsafe NXOpen.Expression | CreateSystemExpression (string @string) |
Creates a system expression. More... | |
unsafe NXOpen.Expression | CreateSystemExpression (string expressionType, string @string) |
Creates a system expression of the specified type. More... | |
unsafe NXOpen.Expression | CreateSystemExpressionFromReferenceString (string reference) |
Creates a system string expression from a reference string in Drafting Note format. More... | |
unsafe NXOpen.Expression | CreateSystemExpressionWithUnits (string @string, NXOpen.Unit unitType) |
Creates a system expression with units. More... | |
unsafe NXOpen.Expression | CreateWithUnits (string @string, NXOpen.Unit unitType) |
Creates an expression with units. More... | |
unsafe void | Delete (NXOpen.Expression expression) |
Deletes an expression More... | |
unsafe void | Edit (NXOpen.Expression expression, string newRightHandSide) |
Edits an expression. More... | |
unsafe void | EditWithUnits (NXOpen.Expression expression, NXOpen.Unit unitType, string newRightHandSide) |
Edits an expression with units. More... | |
unsafe void | ExportToFile (NXOpen.ExpressionCollection.ExportMode exportMode, string fileName, NXOpen.ExpressionCollection.SortType sortType) |
Exports the expressions to a text file, or, if 'file_name' is a null reference (Nothing in Visual Basic), list the expressions in the listing window. More... | |
unsafe NXOpen.Expression | FindObject (string journalIdentifier) |
Finds the NXOpen.Expression with the given identifier as recorded in a journal. More... | |
unsafe NXOpen.Expression | GetAttributeExpression (NXOpen.NXObject @object, string title, NXOpen.NXObject.AttributeType type, int index) |
Get the attribute expression of the specified attribute title/type. More... | |
unsafe NXOpen.Expression[] | GetExpressionsOfType (NXOpen.ExpressionCollection.Type type, bool visibleOnly) |
Returns an array of expressions in the part of the specified NXOpen.ExpressionCollection.Type . More... | |
unsafe string[] | GetInterpartReferences () |
Returns a list of parts that are referenced from expressions in the part "owning_part". More... | |
unsafe void | GetInterpartReferencesFor4gd (out string[] referencedPartNames, out string[] referencedDispNames, out NXOpen.NXObject[] referencedParts) |
Interface for collaborative design More... | |
unsafe void | GetInterpartReferencesWithDisplayNames (out string[] referencedPartNames, out string[] referencedDispNames) |
Returns a list of parts that are referenced from expressions in the part "owning_part". More... | |
unsafe NXOpen.Expression[] | GetVisibleExpressions () |
Returns an array of visible "Number" expressions in the part. More... | |
unsafe void | ImportFromFile (string fileName, NXOpen.ExpressionCollection.ImportMode importMode, out bool expModified, out string[] errorMessages) |
Imports expressions from a file. More... | |
unsafe bool | RemoveInterpartReferences (string partName) |
Removes the interpart references from a part. More... | |
unsafe void | Rename (NXOpen.Expression expression, string newName) |
Changes the name of the expression. More... | |
unsafe void | Replace (string currentName, string replaceName) |
Replaces references to an expression with another expression. More... | |
unsafe void | ReplaceAttributeExpression (NXOpen.Expression expression, NXOpen.NXObject @object, string title, NXOpen.NXObject.AttributeType type, int index) |
Replace the attribute expression of the specified attribute title/type. More... | |
unsafe void | ReplaceRhsInterpartExpression (NXOpen.Expression oldRhsIpe, NXOpen.Expression newRhsIpe) |
Replaces the old right hand side interpart expression references with those of the new right hand side interpart expression. More... | |
unsafe void | SystemRename (NXOpen.Expression expression, string newName) |
Changes the name of the expression without marking system expressions as user expressions. More... | |
NXOpen.Expression[] | ToArray () |
Returns an array of NXOpen.Expression objects. More... | |
Public Member Functions inherited from NXOpen.TaggedObjectCollection | |
IEnumerator | GetEnumerator () |
Returns an enumerator that iterates through a collection. More... | |
Public Member Functions inherited from NXOpen.Utilities.NXRemotableObject | |
IMessageCtrl | AsyncProcessMessage (IMessage msg, IMessageSink replySink) |
Asynchronously processes the given message. More... | |
IMessage | SyncProcessMessage (IMessage msg) |
Synchronously processes the given message. More... | |
Protected Member Functions | |
override int | EnumerateMoveNext (ref Tag currentTag, byte[] state) |
Advances the enumerator to the next element of the collection. More... | |
Protected Member Functions inherited from NXOpen.TaggedObjectCollection | |
new void | initialize () |
<exclude> More... | |
Protected Member Functions inherited from NXOpen.Utilities.NXRemotableObject | |
void | initialize () |
<exclude> More... | |
Properties | |
Tag | Tag [get] |
Returns the tag of this object. More... | |
Represents a collection of expressions.
To obtain an instance of this class, refer to NXOpen.BasePart
Created in NX3.0.0
Identifies the type of expression desired.
In some cases, the types might overlap. For example, a system expression might also be considered a user expression if the original creator has been deleted from the part.
|
inline |
Creates the left hand side name for an overriding interpart expression reference.
For example, if the destination part is A and the source expression is X from part B then NX will create/return the expression for the A::x overrdding interpart expression reference.
Created in NX10.0.0
License requirements: None.
sourceExpression | expression in source part |
|
inline |
Creates the right hand side name for an interpart expression reference.
For example, if the destination part is A and the source expression is X from part B then NX will create/return the expression for the A::x interpart expression reference.
Created in NX10.0.0
License requirements: None.
sourceExpression | expression in source part |
|
inline |
Changes all of the references in the part "owning_part" from expressions in the part "old_part_name" to expressions in the part "new_part_name".
Created in NX4.0.0
License requirements: None.
oldPartName | Part name whose references are being replaced |
newPartName | New part name to reference |
|
inline |
Changes all of the references in the part "owning_part" from expressions in the part "old_part_name" to expressions in the part "new_part_name".
Created in NX7.5.0
License requirements: None.
oldPartName | Part name whose references are being replaced |
newPartName | New part name to reference |
doUpdate | Do update if true |
doChecking | Do checking if true |
|
inline |
Interface for collaborative design
Created in NX11.0.0
License requirements: None.
targetPartOccTag | Part occ of target part |
oldSourcePartName | Part name whose references are being replaced |
newSourcePartOccTag | Part occ of new source part |
doUpdate | Do update if true |
doChecking | Do checking if true |
|
inline |
Creates an expression
Created in NX3.0.0
License requirements: None.
string | the equation for the expression. Must be in the format: name = right_hand_side. For example, "x = 1.2 * y + z". |
|
inline |
Creates an expression of the specified type.
Created in NX5.0.0
License requirements: None.
expressionType | The type of the expression, such as "Number", "String", "Boolean", "Integer", "Point" and "Vector" |
string | the equation for the expression. Must be in the format: name = right_hand_side. For example, "x = 1.2 * y + z". |
|
inline |
Creates interpart expressions.
Created in NX8.5.0
License requirements: None.
|
inline |
Replace expressions.
Created in NX10.0.0
License requirements: None.
|
inline |
Creates a NXOpen.SuppressByExpressionBuilder
Created in NX5.0.0
License requirements: None.
|
inline |
Creates a system expression.
After creating a system expression, you should associate it with an object, such as a sketch dimension. System expressions are deleted when the object they are associated with is deleted.
Created in NX3.0.0
License requirements: None.
string | the equation or right-hand-side for the expression. You can specify a name for the equation by providing a string in the format: name = right_hand_side. For example, "x = 1.2 * y + z". If you do not provide a name, a name will be assigned automatically. For example, if the string is "1.2 * y + z", a name will be assigned automatically. |
|
inline |
Creates a system expression of the specified type.
After creating a system expression, you should associate it with an object, such as a sketch dimension. System expressions are deleted when the object they are associated with is deleted.
Created in NX5.0.0
License requirements: None.
expressionType | The type of the expression, such as "Number", "String", "Boolean", "Integer", "Point" and "Vector" |
string | the equation or right-hand-side for the expression. You can specify a name for the equation by providing a string in the format: name = right_hand_side. For example, "x = 1.2 * y + z". If you do not provide a name, a name will be assigned automatically. For example, if the string is "1.2 * y + z", a name will be assigned automatically. |
|
inline |
Creates a system string expression from a reference string in Drafting Note format.
Only expressions (X) and attributes (W) are supported.
Here is how the control character sequences need to be formatted: Expressions - Xm.n Part Attributes - W Object Attributes - W!obj_id
Created in NX7.5.0
License requirements: None.
reference | the reference string in Drafting Note format |
|
inline |
Creates a system expression with units.
After creating a system expression, you should associate it with an object, such as a sketch dimension. System expressions are deleted when the object they are associated with is deleted.
Created in NX4.0.0
License requirements: None.
string | the equation or right-hand-side for the expression. You can specify a name for the equation by providing a string in the format: name = right_hand_side. For example, "x = 1.2 * y + z". If you do not provide a name, a name will be assigned automatically. For example, if the string is "1.2 * y + z", a name will be assigned automatically. |
unitType | units for the expression |
|
inline |
Creates an expression with units.
Created in NX4.0.0
License requirements: None.
string | the equation for the expression. Must be in the format: name = right_hand_side. For example, "x = 1.2 * y + z". |
unitType | units for the expression |
|
inline |
Deletes an expression
Created in NX4.0.0
License requirements: None.
expression | The expression to be deleted |
|
inline |
Edits an expression.
Note, there is no difference between this method and editing the expression via NXOpen.Expression.RightHandSide if the ExpressionCollection is owned by the part that owns the expression.
Created in NX3.0.0
License requirements: None.
expression | The expression to be edited, Note: if this expression is not owned by the part that owns the ExpressionCollection, a new expression will be created in the part that owns the ExpressionCollection |
newRightHandSide | What you want to change the expression to |
|
inline |
Edits an expression with units.
Changing the units on an existing expression is only allowed when the expression is not referenced yet.
Note, if you do not change the units, there is no difference between this method and editing the expression via NXOpen.Expression.RightHandSide if the ExpressionCollection is owned by the part that owns the expression.
Created in NX4.0.0
License requirements: None.
expression | The expression to be edited, Note: if this expression is not owned by the part that owns the ExpressionCollection, a new expression will be created in the part that owns the ExpressionCollection |
unitType | units for the expression |
newRightHandSide | What you want to change the expression to |
|
inlineprotectedvirtual |
Advances the enumerator to the next element of the collection.
Implements NXOpen.TaggedObjectCollection.
|
inline |
Exports the expressions to a text file, or, if 'file_name' is a null reference (Nothing in Visual Basic), list the expressions in the listing window.
Throws an exception if there is any error.
NOTE: if the file already exists, an exception is thrown and the file is not overwritten.
Created in NX4.0.0
License requirements: None.
exportMode | export mode |
fileName | File name specification to export expressions into. |
sortType | How to sort the exported expressions |
|
inline |
Finds the NXOpen.Expression with the given identifier as recorded in a journal.
An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.
An exception will be thrown if no object can be found with the given journal identifier.
Created in NX3.0.0
License requirements: None.
journalIdentifier | Identifier to be found |
|
inline |
Get the attribute expression of the specified attribute title/type.
Created in NX8.0.0
License requirements: None.
object | The object of the attribute |
title | The title of the attribute |
type | The type of the attribute |
index | The array index if the attribute is an array (use -1 otherwise) |
|
inline |
Returns an array of expressions in the part of the specified NXOpen.ExpressionCollection.Type .
Created in NX1847.0.0
License requirements: None.
type | NXOpen.ExpressionCollection.Type of the expression. |
visibleOnly | Fister to get only visible expressions. |
|
inline |
Returns a list of parts that are referenced from expressions in the part "owning_part".
Created in NX4.0.0
License requirements: None.
|
inline |
Interface for collaborative design
Created in NX11.0.0
License requirements: None.
referencedPartNames | array of internal part names |
referencedDispNames | array of display part names |
referencedParts | array of occ parts and part occs |
|
inline |
Returns a list of parts that are referenced from expressions in the part "owning_part".
Created in NX10.0.0
License requirements: None.
referencedPartNames | array of internal part names |
referencedDispNames | array of display part names |
|
inline |
Returns an array of visible "Number" expressions in the part.
Created in NX4.0.0
License requirements: None.
|
inline |
Imports expressions from a file.
Input a file specification. When calling this method, changes are not applied to the system until Update.DoUpdate is called.
Created in NX4.0.0
License requirements: None.
fileName | File name specification to import expressions from |
importMode | import mode |
expModified | TRUE if any expressions were affected by the import |
errorMessages | translated list of error messages |
|
inline |
Removes the interpart references from a part.
If a part name is given, then it removes the references to that part. If part_name is a null reference (Nothing in Visual Basic), it removes all references to all parts.
References on the RHS are replaced by a numerical value, References on the LHS are deleted. E.g.
x = comp::len + z –> x = 3 + z
comp::height=5 –> (deleted)
The function returns TRUE is any references were removed, and FALSE otherwise.
Created in NX4.0.0
License requirements: None.
partName | Part name to remove references for |
|
inline |
Changes the name of the expression.
Created in NX4.0.0
License requirements: None.
expression | expression to be renamed |
newName | new name of the expression |
|
inline |
Replaces references to an expression with another expression.
Created in NX10.0.0
License requirements: None.
currentName | current expression name |
replaceName | replace expression name |
|
inline |
Replace the attribute expression of the specified attribute title/type.
Created in NX8.0.0
License requirements: None.
expression | the attribute expression |
object | The object of the attribute |
title | The title of the attribute |
type | The type of the attribute |
index | The array index if the attribute is an array (use -1 otherwise) |
|
inline |
Replaces the old right hand side interpart expression references with those of the new right hand side interpart expression.
For example, replacing x="A"x with y="B"y with result in right hand interpart expression x="B"y and expression y=x.
Created in NX11.0.0
License requirements: None.
oldRhsIpe | right hand side interpart expression to be replaced |
newRhsIpe | right hand side interpart expression to be replaced with |
|
inline |
Changes the name of the expression without marking system expressions as user expressions.
Created in NX6.0.0
License requirements: None.
expression | expression to be renamed |
newName | new name of the expression |
|
inline |
Returns an array of NXOpen.Expression objects.
|
get |
Returns the tag of this object.