NX Open C++ Reference Guide
Public Types | Public Member Functions | List of all members
NXOpen::InterpartExpressionsBuilder Class Reference

This class creates interpart expressions from the source part to the current work part via the naming rule defined. More...

Inheritance diagram for NXOpen::InterpartExpressionsBuilder:
NXOpen::Builder NXOpen::TaggedObject NXOpen::GeometricUtilities::IComponentBuilder

Public Types

enum  NamingRules { NamingRulesAddPrefix, NamingRulesAddSuffix, NamingRulesReplace, NamingRulesRenameWithIndex }
 This defines the naming rule used for the name of the expression created in the current work part. More...
 

Public Member Functions

NXString BaseString ()
 Returns the base string. More...
 
void GetExpressions (std::vector< NXOpen::Expression * > &sourceExpressions, std::vector< NXString > &destinationNames)
 Get an array of source expressions. More...
 
NXOpen::InterpartExpressionsBuilder::NamingRules NamingRule ()
 Returns the naming rule. More...
 
NXString ReplaceString ()
 Returns the replace string. More...
 
void SetBaseString (const NXString &baseString)
 Sets the base string. More...
 
void SetBaseString (const char *baseString)
 Sets the base string. More...
 
void SetExpressions (const std::vector< NXOpen::Expression * > &sourceExpressions, const std::vector< NXString > &destinationNames)
 Set an array of source expressions. More...
 
void SetNamingRule (NXOpen::InterpartExpressionsBuilder::NamingRules namingRule)
 Sets the naming rule. More...
 
void SetReplaceString (const NXString &replaceString)
 Sets the replace string. More...
 
void SetReplaceString (const char *replaceString)
 Sets the replace string. More...
 
- Public Member Functions inherited from NXOpen::Builder
NXOpen::NXObjectCommit ()
 Commits any edits that have been applied to the builder. More...
 
void Destroy ()
 Deletes the builder, and cleans up any objects created by the builder. More...
 
std::vector< NXOpen::NXObject * > GetCommittedObjects ()
 For builders that create more than one object, this method returns the objects that are created by commit. More...
 
NXOpen::NXObjectGetObject ()
 Returns the object currently being edited by this builder. More...
 
void ShowResults ()
 Updates the model to reflect the result of an edit to the model for all builders that support showing results. More...
 
virtual bool Validate ()
 Validate whether the inputs to the component are sufficient for commit to be called. More...
 
- Public Member Functions inherited from NXOpen::TaggedObject
tag_t Tag () const
 Returns the tag of this object. More...
 

Detailed Description

This class creates interpart expressions from the source part to the current work part via the naming rule defined.


To create a new instance of this class, use NXOpen::ExpressionCollection::CreateInterpartExpressionsBuilder
Default values.

Property Value

NamingRule

AddPrefix


Created in NX8.5.0.

Member Enumeration Documentation

This defines the naming rule used for the name of the expression created in the current work part.

For example, if expression "x" is selected from source part "A" then you will get these expressions below created in the current work part for the following naming rules:

yx="A"x for AddPrifix with BaseString "y" xy="A"x for AddSuffix with BaseString "y" zz="A"x for Replace with BaseString "x" and ReplaceString "zz" y0="A"x for RenameWithIndex with BaseString "y"

Empty strings are also supported for the BaseString and ReplaceString.

Errors will be issued whenever a generated left hand side expression name has incorrect syntax, already exists in the current work part or the source expression is from the current work part.

Enumerator
NamingRulesAddPrefix 

add prefix

NamingRulesAddSuffix 

add suffix

NamingRulesReplace 

replace

NamingRulesRenameWithIndex 

rename with index

Member Function Documentation

NXString NXOpen::InterpartExpressionsBuilder::BaseString ( )

Returns the base string.

This string is used as the prefix for AddPrefix, the suffix for AddSuffix, the replaced string for Replace and the rename string for RenameWithIndex.
Created in NX8.5.0.

License requirements : None

void NXOpen::InterpartExpressionsBuilder::GetExpressions ( std::vector< NXOpen::Expression * > &  sourceExpressions,
std::vector< NXString > &  destinationNames 
)

Get an array of source expressions.

These are the source expressions to be referenced by the current work part. The destination names can be used to override the naming rule for a given source expression. This is a parallel array. Each source expression has an entry in this array for its destination name. If the associated destination name is the empty string then the naming rule will be used to generate the destination name for a given source expression otherwise the destination name itself will be used to name the new expression in the current work part.
Created in NX8.5.0.

License requirements : None

Parameters
sourceExpressionsarray of source expressions
destinationNamesarray of destination names
NXOpen::InterpartExpressionsBuilder::NamingRules NXOpen::InterpartExpressionsBuilder::NamingRule ( )

Returns the naming rule.

This determines how the name of the expression in the current work part is constructed.
Created in NX8.5.0.

License requirements : None

NXString NXOpen::InterpartExpressionsBuilder::ReplaceString ( )

Returns the replace string.

This string replaces the BaseString for the Replace.
Created in NX8.5.0.

License requirements : None

void NXOpen::InterpartExpressionsBuilder::SetBaseString ( const NXString baseString)

Sets the base string.

This string is used as the prefix for AddPrefix, the suffix for AddSuffix, the replaced string for Replace and the rename string for RenameWithIndex.
Created in NX8.5.0.

License requirements : None

Parameters
baseStringbasestring
void NXOpen::InterpartExpressionsBuilder::SetBaseString ( const char *  baseString)

Sets the base string.

This string is used as the prefix for AddPrefix, the suffix for AddSuffix, the replaced string for Replace and the rename string for RenameWithIndex.
Created in NX8.5.0.

License requirements : None

Parameters
baseStringbasestring
void NXOpen::InterpartExpressionsBuilder::SetExpressions ( const std::vector< NXOpen::Expression * > &  sourceExpressions,
const std::vector< NXString > &  destinationNames 
)

Set an array of source expressions.

These are the source expressions to be referenced by the current work part. The destination names can be used to override the naming rule for a given source expression. This is a parallel array. Each source expression has an entry in this array for its destination name. If the associated destination name is the empty string then the naming rule will be used to generate the destination name for a given source expression otherwise the destination name itself will be used to name the new expression in the current work part.
Created in NX8.5.0.

License requirements : None

Parameters
sourceExpressionsarray of source expressions
destinationNamesarray of destination names
void NXOpen::InterpartExpressionsBuilder::SetNamingRule ( NXOpen::InterpartExpressionsBuilder::NamingRules  namingRule)

Sets the naming rule.

This determines how the name of the expression in the current work part is constructed.
Created in NX8.5.0.

License requirements : None

Parameters
namingRulenamingrule
void NXOpen::InterpartExpressionsBuilder::SetReplaceString ( const NXString replaceString)

Sets the replace string.

This string replaces the BaseString for the Replace.
Created in NX8.5.0.

License requirements : None

Parameters
replaceStringreplacestring
void NXOpen::InterpartExpressionsBuilder::SetReplaceString ( const char *  replaceString)

Sets the replace string.

This string replaces the BaseString for the Replace.
Created in NX8.5.0.

License requirements : None

Parameters
replaceStringreplacestring

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