PartImporter Class

class NXOpen.PartImporter

Bases: NXOpen.Importer

Used to import a part into the work part.

The imported part can be an NX part or a foreign part, e.g. an I-DEAS, CATIA, or Teamcenter Visualization part. A named group will be created with the contents of the imported part if the property NXOpen.PartImporter.CreateNamedGroup`() is turned on. You can access the named group which is created when importing the part by accessing the object array returned from the method Builder.GetCommittedObjects() after you execute the Builder.Commit() on the NXOpen.PartImporter.

To obtain an instance of this class use ImportManager.CreatePartImporter().

New in version NX5.0.0.

Properties

Property Description
CreateNamedGroup Returns or sets the Create Named Group flag.
DestinationCoordinateSystem Returns or sets the destination coordinate system.
DestinationCoordinateSystemSpecification Returns or sets the destination coordinate system specification.
DestinationPoint Returns or sets the destination point.
FileName Returns or sets the name of the file containing the data to import.
ImportCamObjects Returns or sets the Import CAM Objects flag.
ImportViews Returns or sets the Import Views flag.
LayerOption Returns or sets the layer option.
Scale Returns or sets the scale.
Tag Returns the Tag for this object.

Methods

Method Description
Commit Commits any edits that have been applied to the builder.
Destroy Deletes the builder, and cleans up any objects created by the builder.
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetObject Returns the object currently being edited by this builder.
SetSpecifiedCoordinateSystem Sets the specified coordinate system.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Enumerations

PartImporterDestinationCoordinateSystemSpecificationType Enumeration Specifies the destination coordinate system specification.
PartImporterLayerOptionType Enumeration Specifies on which layer to import a part.

Property Detail

CreateNamedGroup

PartImporter.CreateNamedGroup

Returns or sets the Create Named Group flag.

True if the Create Named Group flag is on.

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

Getter Method

Signature CreateNamedGroup

Returns:
Return type:bool

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature CreateNamedGroup

Parameters:createNamedGroup (bool) –

New in version NX5.0.0.

License requirements: None.

DestinationCoordinateSystem

PartImporter.DestinationCoordinateSystem

Returns or sets the destination coordinate system.

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

Getter Method

Signature DestinationCoordinateSystem

Returns:
Return type:NXOpen.NXMatrix

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature DestinationCoordinateSystem

Parameters:destinationCoordinateSystem (NXOpen.NXMatrix) –

New in version NX5.0.0.

License requirements: None.

DestinationCoordinateSystemSpecification

PartImporter.DestinationCoordinateSystemSpecification

Returns or sets the destination coordinate system specification.

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

Getter Method

Signature DestinationCoordinateSystemSpecification

Returns:
Return type:NXOpen.PartImporterDestinationCoordinateSystemSpecificationType

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature DestinationCoordinateSystemSpecification

Parameters:destinationCoordinateSystemSpecification (NXOpen.PartImporterDestinationCoordinateSystemSpecificationType) –

New in version NX5.0.0.

License requirements: None.

DestinationPoint

PartImporter.DestinationPoint

Returns or sets the destination point.

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

Getter Method

Signature DestinationPoint

Returns:
Return type:NXOpen.Point3d

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature DestinationPoint

Parameters:destinationPoint (NXOpen.Point3d) –

New in version NX5.0.0.

License requirements: None.

ImportCamObjects

PartImporter.ImportCamObjects

Returns or sets the Import CAM Objects flag.

True if the Import CAM Objects flag is on.

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

Getter Method

Signature ImportCamObjects

Returns:
Return type:bool

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature ImportCamObjects

Parameters:importCamObjects (bool) –

New in version NX5.0.0.

License requirements: None.

ImportViews

PartImporter.ImportViews

Returns or sets the Import Views flag.

True if the Import Views flag is on.

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

Getter Method

Signature ImportViews

Returns:
Return type:bool

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature ImportViews

Parameters:importViews (bool) –

New in version NX5.0.0.

License requirements: None.

LayerOption

PartImporter.LayerOption

Returns or sets the layer option.

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

Getter Method

Signature LayerOption

Returns:
Return type:NXOpen.PartImporterLayerOptionType

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature LayerOption

Parameters:layerOption (NXOpen.PartImporterLayerOptionType) –

New in version NX5.0.0.

License requirements: None.

Scale

PartImporter.Scale

Returns or sets the scale.

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

Getter Method

Signature Scale

Returns:
Return type:float

New in version NX5.0.0.

License requirements: None.

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

Setter Method

Signature Scale

Parameters:scale (float) –

New in version NX5.0.0.

License requirements: None.

Method Detail

SetSpecifiedCoordinateSystem

PartImporter.SetSpecifiedCoordinateSystem

Overloaded method SetSpecifiedCoordinateSystem

  • SetSpecifiedCoordinateSystem(specifiedCoordinateSystem)
  • SetSpecifiedCoordinateSystem(specifiedCoordinateSystem, deleteSpecifiedCoordinateSystem)

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

Sets the specified coordinate system. This specified coordinate system is deleted after setting the destination coordinate system

Signature SetSpecifiedCoordinateSystem(specifiedCoordinateSystem)

Parameters:specifiedCoordinateSystem (NXOpen.CoordinateSystem) –

New in version NX8.0.0.

License requirements: None.

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

Sets the specified coordinate system. This provides an option whether to delete the specified coordinate system. If not mark for delete then it is user’s responsibility to delete the specified coordinate system.

Signature SetSpecifiedCoordinateSystem(specifiedCoordinateSystem, deleteSpecifiedCoordinateSystem)

Parameters:
  • specifiedCoordinateSystem (NXOpen.CoordinateSystem) –
  • deleteSpecifiedCoordinateSystem (bool) – If true, the specified coordinate system is deleted.

New in version NX8.0.1.

License requirements: None.

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

Validate

PartImporter.Validate

Validate whether the inputs to the component are sufficient for commit to be called.

If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.

Signature Validate()

Returns:Was self validation successful
Return type:bool

New in version NX3.0.1.

License requirements: None.