NX Open C++ Reference Guide
|
Represents the set of Assemblies::Component s that make up an assembly. More...
Public Types | |
enum | CloseModified { CloseModifiedFalse, CloseModifiedTrue } |
Indicates how close component should handle component parts when they are modified. More... | |
enum | OpenComponentStatus { OpenComponentStatusSuccessfullyOpened, OpenComponentStatusDeletedByOpen, OpenComponentStatusCouldNotOpen } |
Open Component Status. More... | |
enum | OpenOption { OpenOptionComponentOnly, OpenOptionImmediateChildren, OpenOptionWholeAssembly } |
Open options for open_components. More... | |
enum | SubstitutionMode { SubstitutionModeNonAssociative, SubstitutionModeSingleComponent, SubstitutionModeAll } |
Defines how a component substitution operation is performed. More... | |
enum | SuppressedState { SuppressedStateInherit, SuppressedStateSuppressed, SuppressedStateUnsuppressed, SuppressedStateSuppressedByExp, SuppressedStateUnsuppressedByExp } |
Defines the component supression states. More... | |
Public Member Functions | |
NXOpen::Assemblies::Arrangement * | ActiveArrangement () |
Returns the currently active Assemblies::Arrangement for this ComponentAssembly. | |
NXOpen::Assemblies::Component * | AddComponent (const NXString &partToAdd, const NXString &referenceSetName, const NXString &componentName, const NXOpen::Point3d &basePoint, const NXOpen::Matrix3x3 &orientation, int layer, NXOpen::PartLoadStatus **loadStatus) |
Creates a new Assemblies::Component in this assembly, based on an existing part file. | |
NXOpen::Assemblies::Component * | AddComponent (const NXString &partToAdd, const NXString &referenceSetName, const NXString &componentName, const NXOpen::Point3d &basePoint, const NXOpen::Matrix3x3 &orientation, int layer, NXOpen::PartLoadStatus **loadStatus, bool uomAsNgc) |
Creates a new Assemblies::Component in this assembly, based on an existing part file. | |
NXOpen::Assemblies::Component * | AddComponent (NXOpen::BasePart *partToAdd, const NXString &referenceSetName, const NXString &componentName, const NXOpen::Point3d &basePoint, const NXOpen::Matrix3x3 &orientation, int layer, NXOpen::PartLoadStatus **loadStatus) |
Creates a new Assemblies::Component in this assembly, based on an existing part file. | |
NXOpen::Assemblies::Component * | AddMasterPartComponent (const NXString &partToAdd, const NXString &referenceSetName, const NXString &componentName, const NXOpen::Point3d &basePoint, const NXOpen::Matrix3x3 &orientation, int layer, NXOpen::PartLoadStatus **loadStatus) |
Creates a new Assemblies::Component in this assembly as master part. | |
NXOpen::Assemblies::Component * | AddMasterPartComponent (NXOpen::Part *partToAdd, const NXString &referenceSetName, const NXString &componentName, const NXOpen::Point3d &basePoint, const NXOpen::Matrix3x3 &orientation, int layer, NXOpen::PartLoadStatus **loadStatus) |
Creates a new Assemblies::Component in this assembly as master part. | |
NXOpen::PartLoadStatus * | AddPendingComponent (const NXString &partToAdd, NXOpen::NXObject *pendingComponent, const NXString &referenceSetName, const NXString &componentName, const NXOpen::Point3d &basePoint, const NXOpen::Matrix3x3 &orientation, int layer, bool uomAsNgc) |
Add a pending Assemblies::Component in this assembly. | |
NXOpen::Assemblies::ArrangementCollection * | Arrangements () |
The collection of Assemblies::Arrangement s defined in the ComponentAssembly Created in NX3.0.0. | |
void | ChangeByName (const NXString &name, const std::vector< NXOpen::Assemblies::Component * > &partOccs) |
Changes the current Arrangement of the given Component s to the Arrangement with the given name. | |
NXOpen::PartCloseStatus * | CloseComponents (const std::vector< NXOpen::Assemblies::Component * > &componentsToClose, NXOpen::BasePart::CloseWholeTree wholeTree, NXOpen::Assemblies::ComponentAssembly::CloseModified closeModified) |
Given an array of components, close the components. | |
void | ConvertRememberedMcs () |
Converts all remembered mating constraints in the part of this assembly to remembered assembly constraints. | |
std::vector < NXOpen::Assemblies::Component * > | CopyComponents (const std::vector< NXOpen::Assemblies::Component * > &components) |
Given an array of components, creates copies of the components such that each copy is created under the parent assembly of the original component. | |
NXOpen::Positioning::ComponentConstraintGroupBuilder * | CreateConstraintGroupBuilder (NXOpen::Positioning::ComponentConstraintGroup *group, NXOpen::Assemblies::Component *contextComponent) |
Creates a Positioning::ComponentConstraintGroupBuilder object. | |
NXOpen::Positioning::MatingConverter * | CreateMatingConverter () |
Creates a Positioning::MatingConverter object for this assembly. | |
void | DeleteMatingConditions () |
Delete all the mating conditions in this assembly. | |
NXOpen::Assemblies::ExplosionCollection * | Explosions () |
The collection of Assemblies::Explosion s defined in the ComponentAssembly Created in NX3.0.0. | |
NXString | GetAsRequiredQuantity (NXOpen::Assemblies::Component *component) |
Gets the as-required quantity on this component. | |
NXOpen::Assemblies::ComponentQuantity | GetComponentQuantityType (NXOpen::Assemblies::Component *component) |
Gets the quantity type of the components. | |
int | GetIntegerQuantity (NXOpen::Assemblies::Component *component) |
Gets the value of the integer quantity of component. | |
bool | GetNonGeometricState (NXOpen::Assemblies::Component *component) |
Gets the component state as Geometric or Non-Geometric. | |
double | GetRealQuantity (NXOpen::Assemblies::Component *component, NXString *units) |
Gets the value of real quantity and corresponding units on this component. | |
NXOpen::Assemblies::ComponentAssembly::SuppressedState | GetSuppressedState (NXOpen::Assemblies::Component *component, bool *controlled) |
Gets the suppression state of the component in its controlling arrangement. | |
NXOpen::Assemblies::ComponentAssembly::SuppressedState | GetSuppressedState (NXOpen::Assemblies::Component *component, NXOpen::Assemblies::Arrangement *arrangement, bool *controlled) |
Gets the suppression state of the component in the given arrangement. | |
NXOpen::Expression * | GetSuppressionExpression (NXOpen::Assemblies::Component *component) |
Gets the expression controlling the suppression of the component in its controlling arrangement. | |
NXOpen::Expression * | GetSuppressionExpression (NXOpen::Assemblies::Component *component, NXOpen::Assemblies::Arrangement *arrangement) |
Gets the expression controlling the suppression of the component in the given arrangment. | |
NXOpen::Assemblies::Component * | MapComponentFromParent (NXOpen::Assemblies::Component *component) |
Maps a component in a parent assembly onto a corresponding component in this assembly. | |
std::vector < NXOpen::Assemblies::Component * > | MapComponentsFromSubassembly (NXOpen::Assemblies::Component *component) |
Maps a component in a subassembly onto the corresponding components in this parent assembly. | |
void | MoveComponent (NXOpen::Assemblies::Component *component, const NXOpen::Vector3d &translation, const NXOpen::Matrix3x3 &rotation) |
Moves a component by specifying a translation and rotation. | |
NXOpen::PartLoadStatus * | OpenComponents (NXOpen::Assemblies::ComponentAssembly::OpenOption openOption, const std::vector< NXOpen::Assemblies::Component * > &componentsToOpen, std::vector< NXOpen::Assemblies::ComponentAssembly::OpenComponentStatus > &openStatus) |
Given an array of components, open the components using the open_option. | |
NXOpen::Positioning::ComponentPositioner * | Positioner () |
Returns the component positioner for this assembly. | |
NXOpen::ErrorList * | ReleaseSuppression (const std::vector< NXOpen::Assemblies::Component * > &components, const std::vector< NXOpen::Assemblies::Arrangement * > &arrangements) |
Release control of the suppression state of an array of components. | |
NXOpen::ErrorList * | ReleaseSuppression (const std::vector< NXOpen::Assemblies::Component * > &components) |
Release control of the suppression state of an array of components. | |
void | RemoveComponent (NXOpen::Assemblies::Component *component) |
Removes a component from this assemebly. | |
void | ReplaceReferenceSet (NXOpen::Assemblies::Component *component, const NXString &newReferenceSet) |
Replaces the reference set used by a component. | |
NXOpen::ErrorList * | ReplaceReferenceSetInOwners (const NXString &newReferenceSet, const std::vector< NXOpen::Assemblies::Component * > &components) |
Sets the reference set used to represent each component in an array. | |
void | RestructureComponents (const std::vector< NXOpen::Assemblies::Component * > &origComponents, NXOpen::Assemblies::Component *newParentComponent, bool deleteFlag, std::vector< NXOpen::Assemblies::Component * > &newComponents, NXOpen::ErrorList **errorList) |
Given an array of components and a specified parent this function will transfer the given components to the parent. | |
NXOpen::Assemblies::Component * | RootComponent () |
Returns. | |
void | SetActiveArrangement (NXOpen::Assemblies::Arrangement *newArrangement) |
Sets the currently active Assemblies::Arrangement for this ComponentAssembly. | |
void | SetAsRequiredQuantity (NXOpen::Assemblies::Component *component) |
Sets the as-required quantity on this component. | |
void | SetDefault (NXOpen::Assemblies::Arrangement *arrangement) |
Set the default Arrangement for the given ComponentAssembly . | |
void | SetEmptyRefset (NXOpen::Assemblies::Component *component) |
Convenience method for setting the reference set used to represent a component to be empty. | |
void | SetEntirePartRefset (NXOpen::Assemblies::Component *component) |
Convenience method for setting the reference set used to represent a component to be the entire part. | |
void | SetIntegerQuantity (NXOpen::Assemblies::Component *component, int integerQuantity) |
Sets the integer quantity on this component. | |
void | SetNonGeometricState (NXOpen::Assemblies::Component *component, bool nonGeometricState) |
Sets the component state to Geometric or Non-Geometric. | |
void | SetRealQuantity (NXOpen::Assemblies::Component *component, double realQuantity, const NXString &quantityUnits) |
Sets the real quantity and corresponding units on this component. | |
NXOpen::Assemblies::Component * | SubstituteComponent (NXOpen::Assemblies::Component *component, NXOpen::BasePart *part, const NXString &newName, const NXString &referenceSet, int layer, NXOpen::Assemblies::ComponentAssembly::SubstitutionMode mode) |
Substitutes an old component with a new component. | |
NXOpen::ErrorList * | SuppressComponents (const std::vector< NXOpen::Assemblies::Component * > &components, const std::vector< NXOpen::Assemblies::Arrangement * > &arrangements) |
Suppresses an array of components. | |
NXOpen::ErrorList * | SuppressComponents (const std::vector< NXOpen::Assemblies::Component * > &components) |
Suppresses an array of components in all Assemblies::Arrangement s in this ComponentAssembly. | |
NXOpen::ErrorList * | SuppressComponents (const std::vector< NXOpen::Assemblies::Component * > &components, const std::vector< NXOpen::Assemblies::Arrangement * > &arrangements, const NXString &expression) |
Suppresses an array of components in all Assemblies::Arrangement s in this ComponentAssembly. | |
NXOpen::ErrorList * | UnsuppressComponents (const std::vector< NXOpen::Assemblies::Component * > &components, const std::vector< NXOpen::Assemblies::Arrangement * > &arrangements) |
Unsuppresses an array of components in this ComponentAssembly. | |
NXOpen::ErrorList * | UnsuppressComponents (const std::vector< NXOpen::Assemblies::Component * > &components) |
Unsuppresses an array of components in all Assemblies::Arrangement s in this ComponentAssembly. |
Represents the set of Assemblies::Component s that make up an assembly.
Components are arranged in a tree structure, with a single component at the root. (See Assemblies::ComponentAssembly::RootComponent .) The components directly below the root are added to this assembly by calling Assemblies::ComponentAssembly::AddComponent . These "Top Level" components are said to be owned directly by this assembly. Top Level components may themselves have subcomponents.
Certain methods in this class will only operate on Top Level components. For example, Assemblies::ComponentAssembly::MoveComponent will throw an exception if the input component is not owned directly by this assembly.
Note, however, that input components will be mapped onto the correct component in the assembly. See Assemblies::ComponentAssembly::MapComponentFromParent .
For any methods that specify a component's position, the orientation matrix is in column order. The first column of the matrix specifies the X axis, the second the Y axis, and the third the Z axis.
To obtain an instance of this class, use BasePart::ComponentAssembly
Created in NX3.0.0.
Open Component Status.
Defines how a component substitution operation is performed.
Returns the currently active Assemblies::Arrangement for this ComponentAssembly.
Created in NX3.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::AddComponent | ( | const NXString & | partToAdd, |
const NXString & | referenceSetName, | ||
const NXString & | componentName, | ||
const NXOpen::Point3d & | basePoint, | ||
const NXOpen::Matrix3x3 & | orientation, | ||
int | layer, | ||
NXOpen::PartLoadStatus ** | loadStatus | ||
) |
Creates a new Assemblies::Component in this assembly, based on an existing part file.
partToAdd | The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter. |
referenceSetName | The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter. |
componentName | The name of the new component NOTE: The full Unicode character set is not supported for this parameter. |
basePoint | Location of the new component |
orientation | Orientation matrix for the new component, in column order. |
layer | The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer. |
loadStatus | Result of loading the part_to_add |
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::AddComponent | ( | const NXString & | partToAdd, |
const NXString & | referenceSetName, | ||
const NXString & | componentName, | ||
const NXOpen::Point3d & | basePoint, | ||
const NXOpen::Matrix3x3 & | orientation, | ||
int | layer, | ||
NXOpen::PartLoadStatus ** | loadStatus, | ||
bool | uomAsNgc | ||
) |
Creates a new Assemblies::Component in this assembly, based on an existing part file.
partToAdd | The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter. |
referenceSetName | The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter. |
componentName | The name of the new component NOTE: The full Unicode character set is not supported for this parameter. |
basePoint | Location of the new component |
orientation | Orientation matrix for the new component, in column order. |
layer | The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer. |
loadStatus | Result of loading the part_to_add |
uomAsNgc | Whether to set to non-geometric if with unit-of-measure |
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::AddComponent | ( | NXOpen::BasePart * | partToAdd, |
const NXString & | referenceSetName, | ||
const NXString & | componentName, | ||
const NXOpen::Point3d & | basePoint, | ||
const NXOpen::Matrix3x3 & | orientation, | ||
int | layer, | ||
NXOpen::PartLoadStatus ** | loadStatus | ||
) |
Creates a new Assemblies::Component in this assembly, based on an existing part file.
partToAdd | The part that defines the new component |
referenceSetName | The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter. |
componentName | The name of the new component NOTE: The full Unicode character set is not supported for this parameter. |
basePoint | Location of the new component |
orientation | Orientation matrix for the new component, in column order. |
layer | The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer. |
loadStatus | Result of loading the part_to_add |
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::AddMasterPartComponent | ( | const NXString & | partToAdd, |
const NXString & | referenceSetName, | ||
const NXString & | componentName, | ||
const NXOpen::Point3d & | basePoint, | ||
const NXOpen::Matrix3x3 & | orientation, | ||
int | layer, | ||
NXOpen::PartLoadStatus ** | loadStatus | ||
) |
Creates a new Assemblies::Component in this assembly as master part.
partToAdd | The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter. |
referenceSetName | The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter. |
componentName | The name of the new component NOTE: The full Unicode character set is not supported for this parameter. |
basePoint | Location of the new component |
orientation | Orientation matrix for the new component, in column order. |
layer | The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer. |
loadStatus | Result of loading the part_to_add |
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::AddMasterPartComponent | ( | NXOpen::Part * | partToAdd, |
const NXString & | referenceSetName, | ||
const NXString & | componentName, | ||
const NXOpen::Point3d & | basePoint, | ||
const NXOpen::Matrix3x3 & | orientation, | ||
int | layer, | ||
NXOpen::PartLoadStatus ** | loadStatus | ||
) |
Creates a new Assemblies::Component in this assembly as master part.
partToAdd | The part that defines the new component |
referenceSetName | The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter. |
componentName | The name of the new component NOTE: The full Unicode character set is not supported for this parameter. |
basePoint | Location of the new component |
orientation | Orientation matrix for the new component, in column order. |
layer | The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer. |
loadStatus | Result of loading the part_to_add |
NXOpen::PartLoadStatus* NXOpen::Assemblies::ComponentAssembly::AddPendingComponent | ( | const NXString & | partToAdd, |
NXOpen::NXObject * | pendingComponent, | ||
const NXString & | referenceSetName, | ||
const NXString & | componentName, | ||
const NXOpen::Point3d & | basePoint, | ||
const NXOpen::Matrix3x3 & | orientation, | ||
int | layer, | ||
bool | uomAsNgc | ||
) |
Add a pending Assemblies::Component in this assembly.
partToAdd | The part that defines the new component NOTE: The full Unicode character set is not supported for this parameter. |
pendingComponent | component to add |
referenceSetName | The name of the reference set used to represent the new component NOTE: The full Unicode character set is not supported for this parameter. |
componentName | The name of the new component NOTE: The full Unicode character set is not supported for this parameter. |
basePoint | Location of the new component |
orientation | Orientation matrix for the new component, in column order. |
layer | The layer to place the new component on -1 means use the original layers defined in the component. 0 means use the work layer. 1-256 means use the specified layer. |
uomAsNgc | Whether to set to non-geometric if with unit-of-measure |
The collection of Assemblies::Arrangement s defined in the ComponentAssembly
Created in NX3.0.0.
void NXOpen::Assemblies::ComponentAssembly::ChangeByName | ( | const NXString & | name, |
const std::vector< NXOpen::Assemblies::Component * > & | partOccs | ||
) |
Changes the current Arrangement of the given Component s to the Arrangement with the given name.
Created in NX7.5.2.
License requirements : assemblies ("ASSEMBLIES MODULE")
name | The name of arrangement to change to NOTE: The full Unicode character set is not supported for this parameter. |
partOccs | The Component s to be modified |
NXOpen::PartCloseStatus* NXOpen::Assemblies::ComponentAssembly::CloseComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | componentsToClose, |
NXOpen::BasePart::CloseWholeTree | wholeTree, | ||
NXOpen::Assemblies::ComponentAssembly::CloseModified | closeModified | ||
) |
Given an array of components, close the components.
This close of the components will check for different reasons that the part cannot be closed. The reasons will be returned in the PartCloseStatus object.
componentsToClose | Array of components to close |
wholeTree | If true, unloads all components of the part. If false, unloads only the top-level part |
closeModified | Behavior of close if component parts are modified. |
Converts all remembered mating constraints in the part of this assembly to remembered assembly constraints.
Created in NX7.5.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
std::vector<NXOpen::Assemblies::Component *> NXOpen::Assemblies::ComponentAssembly::CopyComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | components | ) |
Given an array of components, creates copies of the components such that each copy is created under the parent assembly of the original component.
The original components do not need to be under the same parent assembly as each other.
The number of new components may be different from the original number of components if problems occurred during the copy.
components | Components to be copied. |
Creates a Positioning::ComponentConstraintGroupBuilder object.
This can be used to create a constraint group or edit an existing constraint group. The context component decides which displayed constraints are to be used from the member constraints of an existing constraint group. If the context component is NULL the displayed constraints used are in the same part as the member constraints.
group | Group to be edited, if NULL then a new group is created |
contextComponent | Context component, can be NULL |
NXOpen::Positioning::MatingConverter* NXOpen::Assemblies::ComponentAssembly::CreateMatingConverter | ( | ) |
Creates a Positioning::MatingConverter object for this assembly.
This can be used to convert Mating Conditions in this part and in its child components to Assembly Constraints. Note that this part need not be the work part for this.
Delete all the mating conditions in this assembly.
This can be used before creating assembly constraints in the assembly, if the mating conditions are not being converted. Component-component mating conditions and inherited mating conditions are not deleted. Update should be called afterwards.
Created in NX7.5.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
The collection of Assemblies::Explosion s defined in the ComponentAssembly
Created in NX3.0.0.
NXString NXOpen::Assemblies::ComponentAssembly::GetAsRequiredQuantity | ( | NXOpen::Assemblies::Component * | component | ) |
Gets the as-required quantity on this component.
component | The component to edit. Must be directly owned by this assembly. |
NXOpen::Assemblies::ComponentQuantity NXOpen::Assemblies::ComponentAssembly::GetComponentQuantityType | ( | NXOpen::Assemblies::Component * | component | ) |
Gets the quantity type of the components.
Returns Assemblies::ComponentQuantity .
component | The component to query. Must be directly owned by this assembly. |
int NXOpen::Assemblies::ComponentAssembly::GetIntegerQuantity | ( | NXOpen::Assemblies::Component * | component | ) |
Gets the value of the integer quantity of component.
component | The component to query. Must be directly owned by this assembly. |
bool NXOpen::Assemblies::ComponentAssembly::GetNonGeometricState | ( | NXOpen::Assemblies::Component * | component | ) |
Gets the component state as Geometric or Non-Geometric.
component | The component to query. Must be directly owned by this assembly. |
double NXOpen::Assemblies::ComponentAssembly::GetRealQuantity | ( | NXOpen::Assemblies::Component * | component, |
NXString * | units | ||
) |
Gets the value of real quantity and corresponding units on this component.
component | The component to query. Must be directly owned by this assembly. |
units | Units |
NXOpen::Assemblies::ComponentAssembly::SuppressedState NXOpen::Assemblies::ComponentAssembly::GetSuppressedState | ( | NXOpen::Assemblies::Component * | component, |
bool * | controlled | ||
) |
Gets the suppression state of the component in its controlling arrangement.
component | The component to query. |
controlled | Is the suppression state controlled at the level of arrangement? |
NXOpen::Assemblies::ComponentAssembly::SuppressedState NXOpen::Assemblies::ComponentAssembly::GetSuppressedState | ( | NXOpen::Assemblies::Component * | component, |
NXOpen::Assemblies::Arrangement * | arrangement, | ||
bool * | controlled | ||
) |
Gets the suppression state of the component in the given arrangement.
component | The component to query. |
arrangement | Arrangements in which components should be suppressed. |
controlled | Is the suppression state controlled at the level of arrangement? |
NXOpen::Expression* NXOpen::Assemblies::ComponentAssembly::GetSuppressionExpression | ( | NXOpen::Assemblies::Component * | component | ) |
Gets the expression controlling the suppression of the component in its controlling arrangement.
component | The component to query. |
NXOpen::Expression* NXOpen::Assemblies::ComponentAssembly::GetSuppressionExpression | ( | NXOpen::Assemblies::Component * | component, |
NXOpen::Assemblies::Arrangement * | arrangement | ||
) |
Gets the expression controlling the suppression of the component in the given arrangment.
component | The component to query. |
arrangement | The arrangement in which to query the suppressed state |
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::MapComponentFromParent | ( | NXOpen::Assemblies::Component * | component | ) |
Maps a component in a parent assembly onto a corresponding component in this assembly.
For example, given an Axle assembly:
Axle / \ / \ Left Right Wheel Wheel
and a Car assembly containing two Axle components:
Car _______ |_______ / \ / \ Front Rear Axle Axle / \ / \ / \ / \ Front Left Front Right Rear Left Rear Right Wheel Wheel Wheel Wheel
then calling Axle.MapComponentFromParent with the Front Left Wheel component will return the Left Wheel component. Note that calling Car.MapComponentFromParent on Left Wheel will not work. See Assemblies::ComponentAssembly::MapComponentsFromSubassembly .
Calling Axle.MapComponent with the Left Wheel component will simply return Left Wheel, i.e. it is a null operation.
Note that calling this method may load additional assembly data from the Axle part.
Created in NX3.0.0.
License requirements : None
component | The component to map. This should be defined in the tree of a parent assembly which contains this assembly. |
std::vector<NXOpen::Assemblies::Component *> NXOpen::Assemblies::ComponentAssembly::MapComponentsFromSubassembly | ( | NXOpen::Assemblies::Component * | component | ) |
Maps a component in a subassembly onto the corresponding components in this parent assembly.
For example, given an Axle assembly:
Axle / \ / \ Left Right Wheel Wheel
and a Car assembly containing two Axle components:
Car _______ |_______ / \ / \ Front Rear Axle Axle / \ / \ / \ / \ Front Left Front Right Rear Left Rear Right Wheel Wheel Wheel Wheel
then calling Car.MapComponentsFromSubassembly on Left Wheel will return Front Left Wheel and Rear Left Wheel. See also Assemblies::ComponentAssembly::MapComponentFromParent .
Created in NX3.0.0.
License requirements : None
component | The component to map. This must be defined in a subassembly of this assembly. |
void NXOpen::Assemblies::ComponentAssembly::MoveComponent | ( | NXOpen::Assemblies::Component * | component, |
const NXOpen::Vector3d & | translation, | ||
const NXOpen::Matrix3x3 & | rotation | ||
) |
Moves a component by specifying a translation and rotation.
Note that these are specified in the coordinates of this assembly, which are not necessarily the coordinates of the displayed part. Note that the rotation matrix is expected to be stored in a column order fashion.
Created in NX3.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
component | The component to edit. Must be directly owned by this assembly |
translation | The translation delta |
rotation | The rotation delta, in column order. |
NXOpen::PartLoadStatus* NXOpen::Assemblies::ComponentAssembly::OpenComponents | ( | NXOpen::Assemblies::ComponentAssembly::OpenOption | openOption, |
const std::vector< NXOpen::Assemblies::Component * > & | componentsToOpen, | ||
std::vector< NXOpen::Assemblies::ComponentAssembly::OpenComponentStatus > & | openStatus | ||
) |
Given an array of components, open the components using the open_option.
openOption | The option that controls the open operation |
componentsToOpen | Array of components to open |
openStatus | Shows the status of the objects in an indexed array according to if they could be opened |
Returns the component positioner for this assembly.
The positioner manages the component constraints.
Created in NX4.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::ReleaseSuppression | ( | const std::vector< NXOpen::Assemblies::Component * > & | components, |
const std::vector< NXOpen::Assemblies::Arrangement * > & | arrangements | ||
) |
Release control of the suppression state of an array of components.
The components will no longer have their suppression state controlled by the given arrangements. (Note that it is not an error if the given arrangements do not control the components.)
components | Assemblies::Component s to be released |
arrangements | Arrangements in which components should be released. These arrangements must be defined in this ComponentAssembly |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::ReleaseSuppression | ( | const std::vector< NXOpen::Assemblies::Component * > & | components | ) |
Release control of the suppression state of an array of components.
The components will no longer have their suppression state controlled by any of the arrangements in the ComponentAssembly.
components | Assemblies::Component s to be released |
void NXOpen::Assemblies::ComponentAssembly::RemoveComponent | ( | NXOpen::Assemblies::Component * | component | ) |
Removes a component from this assemebly.
Created in NX3.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
component | The component to remove. Must be directly owned by this assembly. |
void NXOpen::Assemblies::ComponentAssembly::ReplaceReferenceSet | ( | NXOpen::Assemblies::Component * | component, |
const NXString & | newReferenceSet | ||
) |
Replaces the reference set used by a component.
Created in NX3.0.0.
License requirements : None
component | The component to edit. Must be directly owned by this assembly. |
newReferenceSet | The name of the new reference set NOTE: The full Unicode character set is not supported for this parameter. |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::ReplaceReferenceSetInOwners | ( | const NXString & | newReferenceSet, |
const std::vector< NXOpen::Assemblies::Component * > & | components | ||
) |
Sets the reference set used to represent each component in an array.
This is the equivalent of calling:
Assemblies.Component.DirectOwner
Assemblies.ComponentAssembly.ReplaceReferenceSet
on each component in the array. However, this method will ensure that the reference set operations are carried out in the correct order, so that any effects caused by a parent's reference set change will be correctly reflected in the children. If changing reference set on components at various levels in the assembly, use this method.
newReferenceSet | The name of the new reference set NOTE: The full Unicode character set is not supported for this parameter. |
components | Components to be edited. Each component will have its reference set updated in its owning assembly. |
void NXOpen::Assemblies::ComponentAssembly::RestructureComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | origComponents, |
NXOpen::Assemblies::Component * | newParentComponent, | ||
bool | deleteFlag, | ||
std::vector< NXOpen::Assemblies::Component * > & | newComponents, | ||
NXOpen::ErrorList ** | errorList | ||
) |
Given an array of components and a specified parent this function will transfer the given components to the parent.
The original components do not need to be under the same parent assembly as each other.
The number of new components may be different from the original number of components if problems occurred during the transfer
Created in NX6.0.1.
License requirements : assemblies ("ASSEMBLIES MODULE")
origComponents | Array of components to be restructured |
newParentComponent | Destination for restructure |
deleteFlag | Flag to delete original components |
newComponents | Restructured components |
errorList | Any errors that occurred during the restructure |
Returns.
the top-level component, i.e. the component at the root of the component tree.
This component corresponds to the part that owns this Assemblies::ComponentAssembly . The components below this will correspond to parts added by calling Assemblies::ComponentAssembly::AddComponent .
Note that this will be NULL if there are no components in the tree. (I.e. if the part that owns this ComponentAssembly is a piece part.)
Created in NX3.0.0.
License requirements : None
void NXOpen::Assemblies::ComponentAssembly::SetActiveArrangement | ( | NXOpen::Assemblies::Arrangement * | newArrangement | ) |
Sets the currently active Assemblies::Arrangement for this ComponentAssembly.
Created in NX3.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
newArrangement | The new active Assemblies::Arrangement . This Arrangement must be defined in this ComponentAssembly. |
void NXOpen::Assemblies::ComponentAssembly::SetAsRequiredQuantity | ( | NXOpen::Assemblies::Component * | component | ) |
Sets the as-required quantity on this component.
Created in NX6.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
component | The component to edit. Must be directly owned by this assembly. |
void NXOpen::Assemblies::ComponentAssembly::SetDefault | ( | NXOpen::Assemblies::Arrangement * | arrangement | ) |
Set the default Arrangement for the given ComponentAssembly .
Created in NX7.5.2.
License requirements : assemblies ("ASSEMBLIES MODULE")
arrangement | The new default Arrangement . |
void NXOpen::Assemblies::ComponentAssembly::SetEmptyRefset | ( | NXOpen::Assemblies::Component * | component | ) |
Convenience method for setting the reference set used to represent a component to be empty.
Created in NX3.0.0.
License requirements : None
component | The component to edit. Must be directly owned by this assembly. |
void NXOpen::Assemblies::ComponentAssembly::SetEntirePartRefset | ( | NXOpen::Assemblies::Component * | component | ) |
Convenience method for setting the reference set used to represent a component to be the entire part.
Created in NX3.0.0.
License requirements : None
component | The component to edit. Must be directly owned by this assembly. |
void NXOpen::Assemblies::ComponentAssembly::SetIntegerQuantity | ( | NXOpen::Assemblies::Component * | component, |
int | integerQuantity | ||
) |
Sets the integer quantity on this component.
Created in NX6.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
component | The component to edit. Must be directly owned by this assembly. |
integerQuantity | Integer quantity value |
void NXOpen::Assemblies::ComponentAssembly::SetNonGeometricState | ( | NXOpen::Assemblies::Component * | component, |
bool | nonGeometricState | ||
) |
Sets the component state to Geometric or Non-Geometric.
Component which are made non-geometric are undrawn from graphics area.
Created in NX6.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
component | The component to edit. Must be directly owned by this assembly. |
nonGeometricState | True to make component non-geometric, false otherwise |
void NXOpen::Assemblies::ComponentAssembly::SetRealQuantity | ( | NXOpen::Assemblies::Component * | component, |
double | realQuantity, | ||
const NXString & | quantityUnits | ||
) |
Sets the real quantity and corresponding units on this component.
Created in NX6.0.0.
License requirements : assemblies ("ASSEMBLIES MODULE")
component | The component to edit. Must be directly owned by this assembly. |
realQuantity | Real quantity value |
quantityUnits | Units NOTE: The full Unicode character set is not supported for this parameter. |
NXOpen::Assemblies::Component* NXOpen::Assemblies::ComponentAssembly::SubstituteComponent | ( | NXOpen::Assemblies::Component * | component, |
NXOpen::BasePart * | part, | ||
const NXString & | newName, | ||
const NXString & | referenceSet, | ||
int | layer, | ||
NXOpen::Assemblies::ComponentAssembly::SubstitutionMode | mode | ||
) |
Substitutes an old component with a new component.
The new component represents a new part, but will be placed in the same location as the original.
component | The old component to be substituted. |
part | The new part |
newName | The name for the new component NOTE: The full Unicode character set is not supported for this parameter. |
referenceSet | The name of the reference set for the new component NOTE: The full Unicode character set is not supported for this parameter. |
layer | The layer for the new component -1 means use the original layers defined in the component. 0 means use the work layer 1-256 means use the specified layer. |
mode | Defines the substitution mode |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::SuppressComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | components, |
const std::vector< NXOpen::Assemblies::Arrangement * > & | arrangements | ||
) |
Suppresses an array of components.
components | Assemblies::Component s to be suppressed |
arrangements | Arrangements in which components should be suppressed. These arrangements must be defined in this ComponentAssembly |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::SuppressComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | components | ) |
Suppresses an array of components in all Assemblies::Arrangement s in this ComponentAssembly.
components | Assemblies::Component s to be suppressed |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::SuppressComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | components, |
const std::vector< NXOpen::Assemblies::Arrangement * > & | arrangements, | ||
const NXString & | expression | ||
) |
Suppresses an array of components in all Assemblies::Arrangement s in this ComponentAssembly.
components | Assemblies::Component s to be suppressed |
arrangements | Arrangements in which components should be unsuppressed |
expression | Suppress components if expression evalutes zero else unsuppress components NOTE: The full Unicode character set is not supported for this parameter. |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::UnsuppressComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | components, |
const std::vector< NXOpen::Assemblies::Arrangement * > & | arrangements | ||
) |
Unsuppresses an array of components in this ComponentAssembly.
components | Assemblies::Component s to be unsuppressed |
arrangements | Arrangements in which components should be unsuppressed. These arrangements must be defined in this ComponentAssembly |
NXOpen::ErrorList* NXOpen::Assemblies::ComponentAssembly::UnsuppressComponents | ( | const std::vector< NXOpen::Assemblies::Component * > & | components | ) |
Unsuppresses an array of components in all Assemblies::Arrangement s in this ComponentAssembly.
components | Assemblies::Component s to be unsuppressed |