PartFromTemplateBuilder Class

class NXOpen.PDM.PartFromTemplateBuilder

Bases: NXOpen.PDM.PartBuilder

This class provides the methods necessary to create a new part in NX Manager from a template part.

Deprecated in NX10.0.0. Use PDM.PartOperationCreateBuilder instead.

The operation that this builder supports is equivalent to the file new operation which creates a new part from a template (or seed) part.

If the operation is successful, then the newly created part will be the display part.

This class is a singleton meaning only one instance of it can be exist at a time.

New in version NX4.0.0.

Methods

Method Description
AssignPartFileName This method generates a part file name given an input part file type and assigns this part file name to the builder.
AssignPartNumber This method generates a part number given an input part type and assigns this part number to the builder.
AssignPartRevision This method generates a part revision and assigns this part revision to the builder.
Commit Creates the new part that has been fully-specified by calling methods on this builder.
CreatePartCreationObject Create an instance of a NXOpen.PDM.PartCreationObject class that acts as a proxy for a part in NX Manager mode prior to that part being created.
CreatePartSpec Create the specification for the new part that will be created.
Dispose Free resources associated with the instance.
NewAlternateIdManager Create an instance of a NXOpen.PDM.AlternateIdManager class that will be used to create alternate ID information while creating the new part.
NewDatabaseAttributeManager Create an instance of a NXOpen.PDM.DatabaseAttributeManager class that will be used to modify database attributes while creating the new part.
SetAssignPartNumber Sets the part number explicitly into builder.
SetAssignPartType Sets the part type explicitly into builder.
SetContextOperation Sets explicitly the place from where part selection dialog invoked into builder.
SetSeedPart Sets the seed part on which the new part will be based.

Method Detail

Commit

PartFromTemplateBuilder.Commit

Overloaded method Commit

  • Commit()
  • Commit(setAsDisplayPart)

-------------------------------------

Creates the new part that has been fully-specified by calling methods on this builder. The new part will be set to display part after it is created.

Signature Commit()

Returns:newly created part
Return type:NXOpen.BasePart

New in version NX4.0.0.

Deprecated since version NX10.0.0: Use PDM.PartOperationCreateBuilder instead.

License requirements: None.

-------------------------------------

Creates the new part that has been fully-specified by calling methods on this builder. The caller specifies whether the new part should be set as the display after it is created.

Signature Commit(setAsDisplayPart)

Parameters:setAsDisplayPart (bool) – True means the new part will set as the display part. False means that it will not.
Returns:newly created part
Return type:NXOpen.BasePart

New in version NX4.0.0.

Deprecated since version NX10.0.0: Use PDM.PartOperationCreateBuilder instead.

License requirements: None.

-------------------------------------

Dispose

PartFromTemplateBuilder.Dispose

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.

Signature Dispose()

New in version NX4.0.0.

License requirements: None.

SetSeedPart

PartFromTemplateBuilder.SetSeedPart

Sets the seed part on which the new part will be based.

Signature SetSeedPart(seedName)

Parameters:seedName (str) – display name of the seed part. E.g. “Metric”

New in version NX4.0.0.

Deprecated since version NX10.0.0: Use PDM.PartOperationCreateBuilder instead.

License requirements: None.