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

This class serves as the manager for all the part family related operations. More...

Inheritance diagram for NXOpen::PartFamily::TemplateManager:
NXOpen::TransientObject

Public Member Functions

void AddAssertedMassToChosenAttributes (const NXString &attrToAdd, int indexAddAt)
 Adds new attribute of type asserted mass to chosen attributes list of a part family
Created in NX9.0.0.
 
void AddAssertedMassToChosenAttributes (const char *attrToAdd, int indexAddAt)
 Adds new attribute of type asserted mass to chosen attributes list of a part family
Created in NX9.0.0.
 
NXOpen::PartFamily::InstanceDefinitionAddInstanceDefinition (const NXString &familyMemberDefnName, NXOpen::PartFamily::InstanceDefinition *previousFamilyMemberDefn, const NXString &otherNameEntry)
 Creates a new family member definition with the supplied name and places it just under previous family member definition.
 
NXOpen::PartFamily::InstanceDefinitionAddInstanceDefinition (const char *familyMemberDefnName, NXOpen::PartFamily::InstanceDefinition *previousFamilyMemberDefn, const char *otherNameEntry)
 Creates a new family member definition with the supplied name and places it just under previous family member definition.
 
void AddToChosenAttributes (std::vector< NXString > &attrsToAdd, const std::vector< NXOpen::PartFamily::FamilyAttribute::AttrType > &attrsTypes, int indexAddAt)
 Adds new attributes to chosen attributes list of a part family
Created in NX9.0.0.
 
NXOpen::PartFamily::TemplateCreatePartFamily ()
 Creates a part family associated with the owning part.
 
void CutAttributes (const std::vector< NXOpen::PartFamily::FamilyAttribute * > &cutAttrs)
 Cut selected attributes of a part family.
 
void DeleteInstanceDefinition (NXOpen::PartFamily::InstanceDefinition *familyMemberDefinition)
 Delete the family member defintion from template manager.
 
void DeletePartFamily ()
 Deletes a part family associated with the manager/owning part
Created in NX9.0.0.
 
void DeletePartFamilyAttribute (NXOpen::PartFamily::FamilyAttribute *partFamilyAttribute)
 Deletes a given part family attribute
Created in NX9.0.0.
 
void EditPartFamily ()
 Edits a part family associated with the manager/owning part
Created in NX9.0.0.
 
NXString EstablishFamilyInstance (const NXString &memberName)
 Creates a part family member if it doesn't exist on disk.
 
NXString EstablishFamilyInstance (const char *memberName)
 Creates a part family member if it doesn't exist on disk.
 
std::vector
< NXOpen::PartFamily::FamilyAttribute * > 
GetChosenAttributes ()
 Returns the attributes on the template manager These might include the attributes which have not yet been committed onto the core object and have only been created by this instance of the manager.
 
NXOpen::PartFamily::InstanceDefinitionGetInstanceDefinition (const NXString &familyMemberDefnName)
 Get the family member definition already present in family.
 
NXOpen::PartFamily::InstanceDefinitionGetInstanceDefinition (const char *familyMemberDefnName)
 Get the family member definition already present in family.
 
NXOpen::PartFamily::FamilyAttributeGetPartFamilyAttribute (NXOpen::PartFamily::FamilyAttribute::AttrType attrType, const NXString &attrName)
 Get the part family attribute from part family template.
 
NXOpen::PartFamily::FamilyAttributeGetPartFamilyAttribute (NXOpen::PartFamily::FamilyAttribute::AttrType attrType, const char *attrName)
 Get the part family attribute from part family template.
 
NXOpen::PartFamily::TemplateGetPartFamilyTemplate ()
 Get the part family template This method may return NULL if there is no template associated with the templatemanager.
 
std::vector< NXStringGetSelectableAttributes (NXOpen::PartFamily::FamilyAttribute::AttrType attrType)
 The list of attribute names of a given type in the owning part These can be used to create part family attributes.
 
bool Importable ()
 Returns the importable flag value
Created in NX9.0.0.
 
int MoveDownAttributes (const std::vector< NXOpen::PartFamily::FamilyAttribute * > &moveDownAttrs, int moveDownCount)
 Move down the specified attributes of a part family by the moveDownCount.
 
int MoveUpAttributes (const std::vector< NXOpen::PartFamily::FamilyAttribute * > &moveUpAttrs, int moveUpCount)
 Move up the specified attributes of a part family by the moveUpCount.
 
void PasteAttributes (NXOpen::PartFamily::FamilyAttribute *pasteAfter)
 Paste the cut attributes of a part family.
 
void ReorderInstanceDefinition (NXOpen::PartFamily::InstanceDefinition *familyMemberDefinition, NXOpen::PartFamily::InstanceDefinition *previousFamilyMemberDefn)
 Reorder (relocate) familyMemberDefinition just after the previousFamilyMemberDefn.
 
NXString SaveDirectory ()
 Returns the save directory path value
Created in NX9.0.0.
 
int SaveFamilyAndApplyValues (NXOpen::PartFamily::InstanceDefinition *familyMemberDefinition)
 Save part family and apply the values of chosen family member definition to the template part, It returns failure codes through errorCode.
 
std::vector< int > SaveFamilyAndCreateMembers (const std::vector< NXOpen::PartFamily::InstanceDefinition * > &instDefsToCreate)
 Save part family and create the family members supplied through input array.
 
std::vector< int > SaveFamilyAndUpdateMembers (bool forceUpdate, const std::vector< NXOpen::PartFamily::InstanceDefinition * > &instDefsToUpdate)
 Save part family and update the family members supplied through input array.
 
void SavePartFamily ()
 Save the changes in template manager to core part family.
 
void SetImportable (bool isImportable)
 Sets the importable flag value
Created in NX9.0.0.
 
void SetSaveDirectory (const NXString &saveDirectory)
 Sets the save directory path value
Created in NX9.0.0.
 
void SetSaveDirectory (const char *saveDirectory)
 Sets the save directory path value
Created in NX9.0.0.
 
virtual ~TemplateManager ()
 Free resources associated with the instance.
 
- Public Member Functions inherited from NXOpen::TransientObject
void * GetHandle ()
 Handle of the internal object represented by this object.
 

Detailed Description

This class serves as the manager for all the part family related operations.

   All operations that create, edit or delete part family objects are done through this class. 
   Use the method @link Part::NewPartFamilyTemplateManager Part::NewPartFamilyTemplateManager@endlink 
   to create new instance of this class.


Created in NX9.0.0.

Constructor & Destructor Documentation

virtual NXOpen::PartFamily::TemplateManager::~TemplateManager ( )
virtual

Free resources associated with the instance.

After this method is called, it is illegal to use the object. In .NET, this method is automatically called when the object is deleted by the garbage collector


Created in NX9.0.0.

License requirements : None

Member Function Documentation

void NXOpen::PartFamily::TemplateManager::AddAssertedMassToChosenAttributes ( const NXString attrToAdd,
int  indexAddAt 
)

Adds new attribute of type asserted mass to chosen attributes list of a part family
Created in NX9.0.0.



License requirements : adv_assemblies ("ADVANCED ASSEMBLIES"), solid_modeling ("SOLIDS MODELING")

Parameters
attrToAddattrtoadd
indexAddAtindexaddat
void NXOpen::PartFamily::TemplateManager::AddAssertedMassToChosenAttributes ( const char *  attrToAdd,
int  indexAddAt 
)

Adds new attribute of type asserted mass to chosen attributes list of a part family
Created in NX9.0.0.



License requirements : adv_assemblies ("ADVANCED ASSEMBLIES"), solid_modeling ("SOLIDS MODELING")

Parameters
attrToAddattrtoadd
indexAddAtindexaddat
NXOpen::PartFamily::InstanceDefinition* NXOpen::PartFamily::TemplateManager::AddInstanceDefinition ( const NXString familyMemberDefnName,
NXOpen::PartFamily::InstanceDefinition previousFamilyMemberDefn,
const NXString otherNameEntry 
)

Creates a new family member definition with the supplied name and places it just under previous family member definition.

       If the part family is importable, then the otherNameEntry is a mandatory input.
       Depending on whether we are in managed mode or native, familyMemberDefn name may be os_part_name or 
       db_part_name, and otherNameEntry may be db_part_name or os_part_name.
       In case of non-importable part family otherName Entry may be empty.
    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
familyMemberDefnNamefamilymemberdefnname
previousFamilyMemberDefnpreviousfamilymemberdefn
otherNameEntryothernameentry
NXOpen::PartFamily::InstanceDefinition* NXOpen::PartFamily::TemplateManager::AddInstanceDefinition ( const char *  familyMemberDefnName,
NXOpen::PartFamily::InstanceDefinition previousFamilyMemberDefn,
const char *  otherNameEntry 
)

Creates a new family member definition with the supplied name and places it just under previous family member definition.

       If the part family is importable, then the otherNameEntry is a mandatory input.
       Depending on whether we are in managed mode or native, familyMemberDefn name may be os_part_name or 
       db_part_name, and otherNameEntry may be db_part_name or os_part_name.
       In case of non-importable part family otherName Entry may be empty.
    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
familyMemberDefnNamefamilymemberdefnname
previousFamilyMemberDefnpreviousfamilymemberdefn
otherNameEntryothernameentry
void NXOpen::PartFamily::TemplateManager::AddToChosenAttributes ( std::vector< NXString > &  attrsToAdd,
const std::vector< NXOpen::PartFamily::FamilyAttribute::AttrType > &  attrsTypes,
int  indexAddAt 
)

Adds new attributes to chosen attributes list of a part family
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
attrsToAddattrstoadd
attrsTypesattrstypes
indexAddAtindexaddat
NXOpen::PartFamily::Template* NXOpen::PartFamily::TemplateManager::CreatePartFamily ( )

Creates a part family associated with the owning part.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
void NXOpen::PartFamily::TemplateManager::CutAttributes ( const std::vector< NXOpen::PartFamily::FamilyAttribute * > &  cutAttrs)

Cut selected attributes of a part family.

These will be pasted during paste operation. If previously cut attributes are present then they will be lost because the new ones will overwrite them.


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
cutAttrscutattrs
void NXOpen::PartFamily::TemplateManager::DeleteInstanceDefinition ( NXOpen::PartFamily::InstanceDefinition familyMemberDefinition)

Delete the family member defintion from template manager.


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
familyMemberDefinitionfamilymemberdefinition
void NXOpen::PartFamily::TemplateManager::DeletePartFamily ( )

Deletes a part family associated with the manager/owning part
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

void NXOpen::PartFamily::TemplateManager::DeletePartFamilyAttribute ( NXOpen::PartFamily::FamilyAttribute partFamilyAttribute)

Deletes a given part family attribute
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
partFamilyAttributepartfamilyattribute
void NXOpen::PartFamily::TemplateManager::EditPartFamily ( )

Edits a part family associated with the manager/owning part
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

NXString NXOpen::PartFamily::TemplateManager::EstablishFamilyInstance ( const NXString memberName)

Creates a part family member if it doesn't exist on disk.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
memberNamemembername
NXString NXOpen::PartFamily::TemplateManager::EstablishFamilyInstance ( const char *  memberName)

Creates a part family member if it doesn't exist on disk.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
memberNamemembername
std::vector<NXOpen::PartFamily::FamilyAttribute *> NXOpen::PartFamily::TemplateManager::GetChosenAttributes ( )

Returns the attributes on the template manager These might include the attributes which have not yet been committed onto the core object and have only been created by this instance of the manager.

       "Use @link Template::GetAttributes Template::GetAttributes@endlink  to get the committed attributes"   
    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

NXOpen::PartFamily::InstanceDefinition* NXOpen::PartFamily::TemplateManager::GetInstanceDefinition ( const NXString familyMemberDefnName)

Get the family member definition already present in family.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
familyMemberDefnNamefamilymemberdefnname
NXOpen::PartFamily::InstanceDefinition* NXOpen::PartFamily::TemplateManager::GetInstanceDefinition ( const char *  familyMemberDefnName)

Get the family member definition already present in family.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
familyMemberDefnNamefamilymemberdefnname
NXOpen::PartFamily::FamilyAttribute* NXOpen::PartFamily::TemplateManager::GetPartFamilyAttribute ( NXOpen::PartFamily::FamilyAttribute::AttrType  attrType,
const NXString attrName 
)

Get the part family attribute from part family template.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
attrTypeattrtype
attrNameattrname
NXOpen::PartFamily::FamilyAttribute* NXOpen::PartFamily::TemplateManager::GetPartFamilyAttribute ( NXOpen::PartFamily::FamilyAttribute::AttrType  attrType,
const char *  attrName 
)

Get the part family attribute from part family template.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
attrTypeattrtype
attrNameattrname
NXOpen::PartFamily::Template* NXOpen::PartFamily::TemplateManager::GetPartFamilyTemplate ( )

Get the part family template This method may return NULL if there is no template associated with the templatemanager.

    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

std::vector<NXString> NXOpen::PartFamily::TemplateManager::GetSelectableAttributes ( NXOpen::PartFamily::FamilyAttribute::AttrType  attrType)

The list of attribute names of a given type in the owning part These can be used to create part family attributes.

    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
attrTypeattrtype
bool NXOpen::PartFamily::TemplateManager::Importable ( )

Returns the importable flag value
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

int NXOpen::PartFamily::TemplateManager::MoveDownAttributes ( const std::vector< NXOpen::PartFamily::FamilyAttribute * > &  moveDownAttrs,
int  moveDownCount 
)

Move down the specified attributes of a part family by the moveDownCount.

       If the attributes cannot be moved down by the specified count, this method will execute the 
       partial move and return the count that the attributes are actually moved down by.
    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
moveDownAttrsmovedownattrs
moveDownCountmovedowncount
int NXOpen::PartFamily::TemplateManager::MoveUpAttributes ( const std::vector< NXOpen::PartFamily::FamilyAttribute * > &  moveUpAttrs,
int  moveUpCount 
)

Move up the specified attributes of a part family by the moveUpCount.

       If the attributes cannot be moved up by the specified count, this method will execute the 
       partial move and return the count that the attributes are actually moved up by.
    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
moveUpAttrsmoveupattrs
moveUpCountmoveupcount
void NXOpen::PartFamily::TemplateManager::PasteAttributes ( NXOpen::PartFamily::FamilyAttribute pasteAfter)

Paste the cut attributes of a part family.

The pasteAfter attribute must be present in chosen attributes list for this operation to succeed.


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
pasteAfterpasteafter
void NXOpen::PartFamily::TemplateManager::ReorderInstanceDefinition ( NXOpen::PartFamily::InstanceDefinition familyMemberDefinition,
NXOpen::PartFamily::InstanceDefinition previousFamilyMemberDefn 
)

Reorder (relocate) familyMemberDefinition just after the previousFamilyMemberDefn.


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
familyMemberDefinitionfamilymemberdefinition
previousFamilyMemberDefnpreviousfamilymemberdefn
NXString NXOpen::PartFamily::TemplateManager::SaveDirectory ( )

Returns the save directory path value
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

int NXOpen::PartFamily::TemplateManager::SaveFamilyAndApplyValues ( NXOpen::PartFamily::InstanceDefinition familyMemberDefinition)

Save part family and apply the values of chosen family member definition to the template part, It returns failure codes through errorCode.

    @return  


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
familyMemberDefinitionfamilymemberdefinition
std::vector<int> NXOpen::PartFamily::TemplateManager::SaveFamilyAndCreateMembers ( const std::vector< NXOpen::PartFamily::InstanceDefinition * > &  instDefsToCreate)

Save part family and create the family members supplied through input array.

It returns success and failure codes via errorCodes array.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
instDefsToCreateinstdefstocreate
std::vector<int> NXOpen::PartFamily::TemplateManager::SaveFamilyAndUpdateMembers ( bool  forceUpdate,
const std::vector< NXOpen::PartFamily::InstanceDefinition * > &  instDefsToUpdate 
)

Save part family and update the family members supplied through input array.

It returns success and failure codes via errorCodes array.

Returns

Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")
Parameters
forceUpdateforceupdate
instDefsToUpdateinstdefstoupdate
void NXOpen::PartFamily::TemplateManager::SavePartFamily ( )

Save the changes in template manager to core part family.


Created in NX9.0.0.

License requirements : solid_modeling ("SOLIDS MODELING")

void NXOpen::PartFamily::TemplateManager::SetImportable ( bool  isImportable)

Sets the importable flag value
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
isImportableisimportable
void NXOpen::PartFamily::TemplateManager::SetSaveDirectory ( const NXString saveDirectory)

Sets the save directory path value
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
saveDirectorysavedirectory
void NXOpen::PartFamily::TemplateManager::SetSaveDirectory ( const char *  saveDirectory)

Sets the save directory path value
Created in NX9.0.0.



License requirements : solid_modeling ("SOLIDS MODELING")

Parameters
saveDirectorysavedirectory

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