public interface ExpressionCollection extends TaggedObjectCollection
BasePart
Modifier and Type | Interface and Description |
---|---|
static class |
ExpressionCollection.ExportMode
Indicates the mode for exporting expressions.
|
static class |
ExpressionCollection.ImportFromFileData
This class holds the data returned from
importFromFile(java.lang.String, nxopen.ExpressionCollection.ImportMode) |
static class |
ExpressionCollection.ImportMode
Indicates the mode for importing expressions.
|
static class |
ExpressionCollection.InterpartReferencesFor4gdData
This class holds the data returned from
getInterpartReferencesFor4gd() |
static class |
ExpressionCollection.InterpartReferencesWithDisplayNamesData
This class holds the data returned from
getInterpartReferencesWithDisplayNames() |
static class |
ExpressionCollection.SortType
Indicates the mode for sorting expressions.
|
TaggedObjectCollection.Iterator
Modifier and Type | Method and Description |
---|---|
String |
askInterpartLhsName(Expression sourceExpression)
Creates the left hand side name for an overriding interpart expression reference.
|
String |
askInterpartRhsName(Expression sourceExpression)
Creates the right hand side name for an interpart expression reference.
|
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".
|
void |
changeInterpartReferences(String oldPartName,
String newPartName,
boolean doUpdate,
boolean 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".
|
void |
changeInterpartReferencesFor4gd(Component targetPartOccTag,
String oldSourcePartName,
Component newSourcePartOccTag,
boolean doUpdate,
boolean doChecking)
Interface for 4gd
License requirements: None. |
Expression |
create(String string)
Creates an expression
License requirements: None. |
Expression |
createExpression(String expressionType,
String string)
Creates an expression of the specified type.
|
InterpartExpressionsBuilder |
createInterpartExpressionsBuilder()
Creates interpart expressions.
|
ReplaceExpressionsBuilder |
createReplaceExpressionsBuilder()
Replace expressions.
|
SuppressByExpressionBuilder |
createSuppressByExpressionBuilder()
Creates a
SuppressByExpressionBuilder
License requirements: None. |
Expression |
createSystemExpression(String string)
Creates a system expression.
|
Expression |
createSystemExpression(String expressionType,
String string)
Creates a system expression of the specified type.
|
Expression |
createSystemExpressionFromReferenceString(String reference)
Creates a system string expression from a reference string in Drafting Note format.
|
Expression |
createSystemExpressionWithUnits(String string,
Unit unitType)
Creates a system expression with units.
|
Expression |
createWithUnits(String string,
Unit unitType)
Creates an expression with units.
|
void |
delete(Expression expression)
Deletes an expression
License requirements: None. |
void |
edit(Expression expression,
String newRightHandSide)
Edits an expression.
|
void |
editWithUnits(Expression expression,
Unit unitType,
String newRightHandSide)
Edits an expression with units.
|
void |
exportToFile(ExpressionCollection.ExportMode exportMode,
String fileName,
ExpressionCollection.SortType sortType)
Exports the expressions to a text file, or, if 'file_name' is null,
list the expressions in the listing window.
|
Expression |
findObject(String journalIdentifier)
Finds the
Expression with the given identifier as recorded in a journal. |
Expression |
getAttributeExpression(NXObject object,
String title,
NXObject.AttributeType type,
int index)
Get the attribute expression of the specified attribute title/type.
|
String[] |
getInterpartReferences()
Returns a list of parts that are referenced from expressions in the part "owning_part".
|
ExpressionCollection.InterpartReferencesFor4gdData |
getInterpartReferencesFor4gd()
Interface for 4gd
License requirements: None. |
ExpressionCollection.InterpartReferencesWithDisplayNamesData |
getInterpartReferencesWithDisplayNames()
Returns a list of parts that are referenced from expressions in the part "owning_part".
|
Expression[] |
getVisibleExpressions()
Returns an array of visible "Number" expressions in the part.
|
ExpressionCollection.ImportFromFileData |
importFromFile(String fileName,
ExpressionCollection.ImportMode importMode)
Imports expressions from a file.
|
boolean |
removeInterpartReferences(String partName)
Removes the interpart references from a part.
|
void |
rename(Expression expression,
String newName)
Changes the name of the expression.
|
void |
replace(String currentName,
String replaceName)
Replaces references to an expression with another expression.
|
void |
replaceAttributeExpression(Expression expression,
NXObject object,
String title,
NXObject.AttributeType type,
int index)
Replace the attribute expression of the specified attribute title/type.
|
void |
replaceRhsInterpartExpression(Expression oldRhsIpe,
Expression newRhsIpe)
Replaces the old right hand side interpart expression references with those of the
new right hand side interpart expression.
|
void |
systemRename(Expression expression,
String newName)
Changes the name of the expression without marking system expressions as user expressions.
|
_find_next, iterator
Expression create(String string) throws NXException, RemoteException
string
- the equation for the expression. Must be in the format: name = right_hand_side.
For example, "x = 1.2 * y + z".NXException
RemoteException
Expression createWithUnits(String string, Unit unitType) throws NXException, RemoteException
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 expressionNXException
RemoteException
Expression createSystemExpression(String string) throws NXException, RemoteException
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.NXException
RemoteException
Expression createSystemExpressionWithUnits(String string, Unit unitType) throws NXException, RemoteException
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 expressionNXException
RemoteException
Expression createExpression(String expressionType, String string) throws NXException, RemoteException
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".NXException
RemoteException
Expression createSystemExpression(String expressionType, String string) throws NXException, RemoteException
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.NXException
RemoteException
void edit(Expression expression, String newRightHandSide) throws NXException, RemoteException
Expression.setRightHandSide(java.lang.String)
if the ExpressionCollection is owned by the part that owns the expression.
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 ExpressionCollectionnewRightHandSide
- What you want to change the expression toNXException
RemoteException
void editWithUnits(Expression expression, Unit unitType, String newRightHandSide) throws NXException, RemoteException
Expression.setRightHandSide(java.lang.String)
if the ExpressionCollection is owned by the part that owns the expression. 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 ExpressionCollectionunitType
- units for the expressionnewRightHandSide
- What you want to change the expression toNXException
RemoteException
void delete(Expression expression) throws NXException, RemoteException
expression
- The expression to be deletedNXException
RemoteException
Expression findObject(String journalIdentifier) throws NXException, RemoteException
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.
journalIdentifier
- Identifier to be foundNXException
RemoteException
ExpressionCollection.ImportFromFileData importFromFile(String fileName, ExpressionCollection.ImportMode importMode) throws NXException, RemoteException
Update.doUpdate(int)
is called.
fileName
- File name specification to import expressions fromimportMode
- import modeNXException
RemoteException
void exportToFile(ExpressionCollection.ExportMode exportMode, String fileName, ExpressionCollection.SortType sortType) throws NXException, RemoteException
exportMode
- export modefileName
- File name specification to export expressions into.sortType
- How to sort the exported expressionsNXException
RemoteException
String[] getInterpartReferences() throws NXException, RemoteException
NXException
RemoteException
ExpressionCollection.InterpartReferencesWithDisplayNamesData getInterpartReferencesWithDisplayNames() throws NXException, RemoteException
NXException
RemoteException
ExpressionCollection.InterpartReferencesFor4gdData getInterpartReferencesFor4gd() throws NXException, RemoteException
NXException
RemoteException
boolean removeInterpartReferences(String partName) throws NXException, RemoteException
partName
- Part name to remove references forNXException
RemoteException
void changeInterpartReferences(String oldPartName, String newPartName) throws NXException, RemoteException
oldPartName
- Part name whose references are being replacednewPartName
- New part name to referenceNXException
RemoteException
void changeInterpartReferences(String oldPartName, String newPartName, boolean doUpdate, boolean doChecking) throws NXException, RemoteException
oldPartName
- Part name whose references are being replacednewPartName
- New part name to referencedoUpdate
- Do update if truedoChecking
- Do checking if trueNXException
RemoteException
void changeInterpartReferencesFor4gd(Component targetPartOccTag, String oldSourcePartName, Component newSourcePartOccTag, boolean doUpdate, boolean doChecking) throws NXException, RemoteException
targetPartOccTag
- Part occ of target partoldSourcePartName
- Part name whose references are being replacednewSourcePartOccTag
- Part occ of new source partdoUpdate
- Do update if truedoChecking
- Do checking if trueNXException
RemoteException
Expression[] getVisibleExpressions() throws NXException, RemoteException
NXException
RemoteException
void rename(Expression expression, String newName) throws NXException, RemoteException
expression
- expression to be renamednewName
- new name of the expressionNXException
RemoteException
void systemRename(Expression expression, String newName) throws NXException, RemoteException
expression
- expression to be renamednewName
- new name of the expressionNXException
RemoteException
void replace(String currentName, String replaceName) throws NXException, RemoteException
currentName
- current expression namereplaceName
- replace expression nameNXException
RemoteException
SuppressByExpressionBuilder createSuppressByExpressionBuilder() throws NXException, RemoteException
NXException
RemoteException
Expression createSystemExpressionFromReferenceString(String reference) throws NXException, RemoteException
reference
- the reference string in Drafting Note formatNXException
RemoteException
Expression getAttributeExpression(NXObject object, String title, NXObject.AttributeType type, int index) throws NXException, RemoteException
object
- The object of the attributetitle
- The title of the attributetype
- The type of the attributeindex
- The array index if the attribute is an array (use -1 otherwise)NXException
RemoteException
void replaceAttributeExpression(Expression expression, NXObject object, String title, NXObject.AttributeType type, int index) throws NXException, RemoteException
expression
- the attribute expressionobject
- The object of the attributetitle
- The title of the attributetype
- The type of the attributeindex
- The array index if the attribute is an array (use -1 otherwise)NXException
RemoteException
InterpartExpressionsBuilder createInterpartExpressionsBuilder() throws NXException, RemoteException
NXException
RemoteException
ReplaceExpressionsBuilder createReplaceExpressionsBuilder() throws NXException, RemoteException
NXException
RemoteException
String askInterpartRhsName(Expression sourceExpression) throws NXException, RemoteException
sourceExpression
- expression in source partNXException
RemoteException
String askInterpartLhsName(Expression sourceExpression) throws NXException, RemoteException
sourceExpression
- expression in source partNXException
RemoteException
void replaceRhsInterpartExpression(Expression oldRhsIpe, Expression newRhsIpe) throws NXException, RemoteException
oldRhsIpe
- right hand side interpart expression to be replacednewRhsIpe
- right hand side interpart expression to be replaced withNXException
RemoteException
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.