public interface PartCollection extends TaggedObjectCollection
newDisplay(java.lang.String, nxopen.Part.Units)
,
openDisplay(java.lang.String)
and BasePart.saveAs(java.lang.String)
can take part names in NX Manager command-line format while running in NX Manager mode.
This format is as follows:
Master Part: <@ >DB/part-number/revision <@ >DB/part-number/revision/master <@ >DB/part-number/revision/master <@ >DB/part-number/revision/master/version Non-Master Part: <@ >DB/part-number/revision/type/name <@ >DB/part-number/revision/type/name/version
Session
Modifier and Type | Interface and Description |
---|---|
static class |
PartCollection.ImportToolDesignPackageData
This class holds the data returned from
importToolDesignPackage(java.lang.String, java.lang.String) |
static class |
PartCollection.MirrorPlaneDataOfMirrorPartData
This class holds the data returned from
getMirrorPlaneDataOfMirrorPart(nxopen.Part) |
static class |
PartCollection.OpenBaseData
This class holds the data returned from
openBase(java.lang.String) |
static class |
PartCollection.OpenData
This class holds the data returned from
open(java.lang.String) |
static interface |
PartCollection.PartClosedHandler
User defined method that is called whenever a part is in the process of being closed.
|
static interface |
PartCollection.PartCreatedHandler
User defined method that is called whenever a new part is created.
|
static interface |
PartCollection.PartModifiedHandler
User defined method that is called whenever a part is modified
|
static interface |
PartCollection.PartOpenedHandler
User defined method that is called whenever a part is opened.
|
static interface |
PartCollection.PartRenamedHandler
User defined method that is called whenever a part is renamed
|
static interface |
PartCollection.PartSavedAsHandler
User defined method that is called whenever a part is saved as a specified name.
|
static interface |
PartCollection.PartSavedHandler
User defined method that is called whenever a part is saved.Do not create, open, save
other parts or change display part inside this callback.
|
static class |
PartCollection.RefsetOption
Controls the reference set used when setting the work component.
|
static class |
PartCollection.SaveAllData
This class holds the data returned from
saveAll() |
static class |
PartCollection.SdpsStatus
Indicates the reason why it was not possible to use Design in Context (i.e. to set
the work part to a component of the displayed part.)
|
static class |
PartCollection.SetDisplayData
This class holds the data returned from
setDisplay(nxopen.BasePart, boolean, boolean) |
static class |
PartCollection.WorkComponentOption
Controls the behavior when setting the work component.
|
static interface |
PartCollection.WorkPartChangedHandler
User defined method that is called whenever the work part changes
|
TaggedObjectCollection.Iterator
Modifier and Type | Method and Description |
---|---|
int |
addPartClosedHandler(PartCollection.PartClosedHandler handler)
Registers a user defined method that is called whenever a part is in the process of being closed
License requirements: None. |
int |
addPartCreatedHandler(PartCollection.PartCreatedHandler handler)
Registers a user defined method that is called whenever a new part is created
License requirements: None. |
int |
addPartModifiedHandler(PartCollection.PartModifiedHandler handler)
Registers a user defined method that is called whenever a part is modified
License requirements: None. |
int |
addPartOpenedHandler(PartCollection.PartOpenedHandler handler)
Registers a user defined method that is called whenever a part is opened
License requirements: None. |
int |
addPartRenamedHandler(PartCollection.PartRenamedHandler handler)
Registers a user defined method that is called whenever a part is renamed
License requirements: None. |
int |
addPartSavedAsHandler(PartCollection.PartSavedAsHandler handler)
Registers a user defined method that is called whenever a part is saved as a specified name
License requirements: None. |
int |
addPartSavedHandler(PartCollection.PartSavedHandler handler)
Registers a user defined method that is called whenever a part is saved
License requirements: None. |
int |
addWorkPartChangedHandler(PartCollection.WorkPartChangedHandler handler)
Registers a method that is called whenever the work part changes
License requirements: None. |
BasePart |
baseDisplay()
Returns the current display part of the session.
|
BasePart |
baseWork()
Returns the current work part of the session.
|
void |
closeAll(BasePart.CloseModified closeModified,
PartCloseResponses responses)
Closes all the parts open in the session.
|
LinkedMirrorPartBuilder |
createLinkedMirrorPartBuilder(Part part)
Creates a
LinkedMirrorPartBuilder
License requirements: solid_modeling ("SOLIDS MODELING") Created in NX8.5.0 |
Part |
display()
Returns the current display part of the session.
|
FileNew |
fileNew()
Creates a
FileNew
License requirements: None. |
BasePart |
findObject(String name)
Finds the
BasePart with the given name. |
PartSaveStatus |
forceSaveAll()
Saves all modified parts in a session.
|
LinkedMirrorPartBuilder.MirrorCsysOption |
getMirrorCsysOptionOfMirrorPart(Part part)
Get the type of mirror coordinate system for the given linked mirrored part
License requirements: solid_modeling ("SOLIDS MODELING") . |
LinkedMirrorPartBuilder.MirrorPartTypeOption |
getMirrorPartType(Part part)
Get the type of linked mirrored part
License requirements: solid_modeling ("SOLIDS MODELING") . |
PartCollection.MirrorPlaneDataOfMirrorPartData |
getMirrorPlaneDataOfMirrorPart(Part part)
Get the origin point and the normal direction of the mirror plane for the given linked mirrored part
License requirements: solid_modeling ("SOLIDS MODELING") . |
String |
getSourcePartNameOfMirrorPart(Part mirrorPart)
Get source part name of mirror part
License requirements: solid_modeling ("SOLIDS MODELING") . |
PartCollection.ImportToolDesignPackageData |
importToolDesignPackage(String filename,
String outputDirectory)
Import tool design package
License requirements: None. |
boolean |
isExactMirroredPart(Part part)
Check whether given part is an exact linked mirrored part
License requirements: solid_modeling ("SOLIDS MODELING") . |
boolean |
isMirroredPart(Part part)
Check whether given part is a linked mirrored part
License requirements: solid_modeling ("SOLIDS MODELING") . |
LoadOptions |
loadOptions()
|
BasePart |
newBaseDisplay(String name,
BasePart.Units units)
Creates a new part and sets this part as the display part.
|
Part |
newDisplay(String name,
Part.Units units)
Creates a new .prt part and sets this part as the display part.
|
PartCloseResponses |
newPartCloseResponses()
Constructs a new PartCloseResponses class.
|
PartCollection.OpenData |
open(String filename)
Opens an existing .prt part, but does not set it to be the displayed part.
|
PartCollection.OpenBaseData |
openBase(String filename)
Opens an existing part, but does not set it to be the displayed part.
|
PartCollection.OpenBaseData |
openBaseDisplay(String filename)
Opens an existing part and sets this part as the display part.
|
PartCollection.OpenData |
openDisplay(String filename)
Opens an existing .prt part and sets this part as the display part.
|
void |
openSeedPartBlankTemplate(String filename,
boolean addMaster)
Open unpopulated dataset with blank template
License requirements: None. |
PartManager |
pdmpartManager()
|
void |
removePartClosedHandler(int id)
Unregisters a user defined method that is called whenever a part is in the process of being closed
License requirements: None. |
void |
removePartCreatedHandler(int id)
Unregisters a user defined method that is called whenever a new part is created
License requirements: None. |
void |
removePartModifiedHandler(int id)
Unregisters a user defined method that is called whenever a part is modified
License requirements: None. |
void |
removePartOpenedHandler(int id)
Unregisters a user defined method that is called whenever a part is opened
License requirements: None. |
void |
removePartRenamedHandler(int id)
Unregisters a user defined method that is called whenever a part is renamed
License requirements: None. |
void |
removePartSavedAsHandler(int id)
Unregisters a user defined method that is called whenever a part is saved as a specified name
License requirements: None. |
void |
removePartSavedHandler(int id)
Unregisters a user defined method that is called whenever a part is saved
License requirements: None. |
void |
removePassword(Part part)
Remove password of the part.
|
void |
removeWorkPartChangedHandler(int id)
Unregisters a method that is called whenever the work part changes.
|
PartReopenReport |
reopenAll(BasePart.CloseModified closeModified,
PartCloseResponses responses)
Reopens all modified parts in the session.
|
PartCollection.SaveAllData |
saveAll()
Saves all modified parts in a session.
|
SaveOptions |
saveOptions()
|
PartCollection.SetDisplayData |
setDisplay(BasePart part,
boolean maintainWorkPart,
boolean setEntirePart)
Sets the displayed part.
|
void |
setMirrorPartType(Part part,
LinkedMirrorPartBuilder.MirrorPartTypeOption mirrorOption)
Set the type of linked mirrored part
License requirements: solid_modeling ("SOLIDS MODELING") . |
void |
setNonmasterSeedPartData(String filename)
Set non master seed part data for opening unpopulated non master part
License requirements: None. |
void |
setOpenPassword(String fileName,
String password)
Input password to the current session.
|
void |
setPassword(Part part,
String uAdminPassword,
String uReadPassword,
String uWritePassword,
String uFullControlPassword)
Set password to the part.
|
void |
setSeedPartTemplateData(String filename,
String templateName,
boolean addMaster)
Specify template data to open seed part or empty item revision
License requirements: None. |
void |
setWork(BasePart part)
Sets the current work part.
|
PartLoadStatus |
setWorkComponent(Component workComponent)
Sets the work component.
|
PartLoadStatus |
setWorkComponent(Component workComponent,
PartCollection.RefsetOption refsetOption,
PartCollection.WorkComponentOption visibility)
Sets the work component.
|
PartLoadStatus |
setWorkComponentOverride(Component workComponent)
Sets the component with override part as the work component.
|
SearchManager |
shapeSearchManager()
|
void |
solveAllPostponedConstraints()
Solves all the constraints, that have been postponed in their arrangement,
in every loaded part in the session.
|
Part |
work()
Returns the current work part of the session.
|
Component |
workComponent()
Returns
the work component.
|
_find_next, iterator
LoadOptions loadOptions() throws RemoteException
RemoteException
SaveOptions saveOptions() throws RemoteException
RemoteException
PartManager pdmpartManager() throws RemoteException
RemoteException
SearchManager shapeSearchManager() throws RemoteException
RemoteException
BasePart findObject(String name) throws NXException, RemoteException
BasePart
with the given name. The part must have been loaded
in this session.
An exception will be thrown if no object can be found with the given name.
name
- The name of the BasePart
. This may either be the full pathname of the leaf name.NXException
RemoteException
Part newDisplay(String name, Part.Units units) throws NXException, RemoteException
newDisplay(java.lang.String, nxopen.Part.Units)
to
create other types of parts other than .prt parts.
name
- Name of new part units
- Units of new partNXException
RemoteException
BasePart newBaseDisplay(String name, BasePart.Units units) throws NXException, RemoteException
name
- Name of new part units
- Units of new partNXException
RemoteException
PartCollection.OpenData open(String filename) throws NXException, RemoteException
openDisplay(java.lang.String)
.
openBase(java.lang.String)
to
open other types of parts other than .prt parts.
filename
- NXException
RemoteException
PartCollection.OpenBaseData openBase(String filename) throws NXException, RemoteException
openBaseDisplay(java.lang.String)
.
filename
- NXException
RemoteException
PartCollection.OpenData openDisplay(String filename) throws NXException, RemoteException
openBaseDisplay(java.lang.String)
to
open other types of parts other than .prt parts.
LoadOptions.componentsToLoad()
property is set:
LoadOptions.LoadComponents.ALL
)
will load all components of the assembly.
LoadOptions.LoadComponents.LAST_SET
)
will load the components in the last saved component set.
LoadOptions.LoadComponents.NONE
),
"Use Last Filter" (LoadOptions.LoadComponents.LAST_FILTER
) or
"Specify Filter" (LoadOptions.LoadComponents.SPECIFY_FILTER
)
will load none of the components of the assembly.
filename
- NXException
RemoteException
PartCollection.OpenBaseData openBaseDisplay(String filename) throws NXException, RemoteException
LoadOptions.componentsToLoad()
property is set:
LoadOptions.LoadComponents.ALL
)
will load all components of the assembly.
LoadOptions.LoadComponents.LAST_SET
)
will load the components in the last saved component set.
LoadOptions.LoadComponents.NONE
),
"Use Last Filter" (LoadOptions.LoadComponents.LAST_FILTER
) or
"Specify Filter" (LoadOptions.LoadComponents.SPECIFY_FILTER
)
will load none of the components of the assembly.
BasePart.BookmarkOption.ALL_PLUS_DISPLAY
BasePart.BookmarkOption.COMPONENT_GROUPS_LOAD_OPTIONS_PLUS_DISPLAY
BasePart.BookmarkOption.COMPONENT_GROUPS_ONLY_PLUS_DISPLAY
BasePart.BookmarkOption.DISPLAY_ONLY
the display data in the bookmark file will not be applied to the displayed part.
filename
- NXException
RemoteException
PartCollection.SaveAllData saveAll() throws NXException, RemoteException
NXException
RemoteException
void closeAll(BasePart.CloseModified closeModified, PartCloseResponses responses) throws NXException, RemoteException
closeModified
- Behavior of close if component
parts are modified.responses
- Class representing list of parts to close or leave open if modified. Only
used if closed_modified is set to
BasePart.CloseModified.USE_RESPONSES
. If
BasePart.CloseModified.USE_RESPONSES
is set, then
any parts that are candidates for being closed that are not in this list
will be closed whether modified or not. See
PartCloseResponses
for how to add responses to this
class.NXException
RemoteException
PartReopenReport reopenAll(BasePart.CloseModified closeModified, PartCloseResponses responses) throws NXException, RemoteException
closeModified
- Behavior of close if component
parts are modified.responses
- Class representing list of parts to close or leave open if modified. Only
used if closed_modified is set to
BasePart.CloseModified.USE_RESPONSES
. If
BasePart.CloseModified.USE_RESPONSES
is set, then
any parts that are candidates for being closed that are not in this list
will be closed whether modified or not. See
PartCloseResponses
for how to add responses to this
class.NXException
RemoteException
Part work() throws NXException, RemoteException
ComponentAssembly
.
See: workComponent()
NXException
RemoteException
BasePart baseWork() throws NXException, RemoteException
ComponentAssembly
.
See: workComponent()
NXException
RemoteException
Part display() throws NXException, RemoteException
NXException
RemoteException
BasePart baseDisplay() throws NXException, RemoteException
NXException
RemoteException
void setWork(BasePart part) throws NXException, RemoteException
setWorkComponent(nxopen.assemblies.Component)
.
If no visible component is available, then an exception is thrown.
part
- The new work part.NXException
RemoteException
Component workComponent() throws NXException, RemoteException
ComponentAssembly
which represents the current work part.
Note that there may be several different components which represent the same
work part. In this case, one of them will be selected as the work component, while
the others will be greyed out on the main display.
NXException
RemoteException
PartLoadStatus setWorkComponent(Component workComponent) throws NXException, RemoteException
workComponent
- The new work component. This must be a component defined in the
ComponentAssembly
of the current displayed part.
May be null, in which case the work part is reset to the displayed part.NXException
RemoteException
PartLoadStatus setWorkComponent(Component workComponent, PartCollection.RefsetOption refsetOption, PartCollection.WorkComponentOption visibility) throws NXException, RemoteException
workComponent
- The new work component. This must be a component defined in the
ComponentAssembly
of the current displayed part.
May be null, in which case the work part is reset to the displayed part.refsetOption
- Controls the reference set of the new component.visibility
- Controls the behavior if the new component is not visibleNXException
RemoteException
PartLoadStatus setWorkComponentOverride(Component workComponent) throws NXException, RemoteException
workComponent
- The new work component. This must be a component defined in the
ComponentAssembly
of the current displayed part.NXException
RemoteException
PartCollection.SetDisplayData setDisplay(BasePart part, boolean maintainWorkPart, boolean setEntirePart) throws NXException, RemoteException
part
- The new displayed partmaintainWorkPart
- If true, and if the current work part is a component of the
new displayed part, then the work part remains unchanged. Otherwise
the work part is set to the new displayed part.setEntirePart
- If true, and if maintain_work_part is true,
the reference set of the work_component will be set
to "Entire Part". If false, it will be left unchanged. See
ComponentAssembly.replaceReferenceSet(nxopen.assemblies.Component, java.lang.String)
NXException
RemoteException
PartCloseResponses newPartCloseResponses() throws NXException, RemoteException
NXException
RemoteException
FileNew fileNew() throws NXException, RemoteException
NXException
RemoteException
int addPartCreatedHandler(PartCollection.PartCreatedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartCreatedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addPartOpenedHandler(PartCollection.PartOpenedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartOpenedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addPartSavedHandler(PartCollection.PartSavedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartSavedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addPartSavedAsHandler(PartCollection.PartSavedAsHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartSavedAsHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addPartClosedHandler(PartCollection.PartClosedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartClosedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addPartModifiedHandler(PartCollection.PartModifiedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartModifiedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addPartRenamedHandler(PartCollection.PartRenamedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removePartRenamedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
int addWorkPartChangedHandler(PartCollection.WorkPartChangedHandler handler) throws NXException, RemoteException
handler
- method to registerNXException
RemoteException
void removeWorkPartChangedHandler(int id) throws NXException, RemoteException
id
- identifier for method to unregisterNXException
RemoteException
PartSaveStatus forceSaveAll() throws NXException, RemoteException
NXException
RemoteException
void setSeedPartTemplateData(String filename, String templateName, boolean addMaster) throws NXException, RemoteException
filename
- Name of the part templateName
- Name of the template addMaster
- Whether master should be added as childNXException
RemoteException
void openSeedPartBlankTemplate(String filename, boolean addMaster) throws NXException, RemoteException
filename
- Name of the part addMaster
- whether to add master as componentNXException
RemoteException
void setNonmasterSeedPartData(String filename) throws NXException, RemoteException
filename
- Name of the part NXException
RemoteException
LinkedMirrorPartBuilder createLinkedMirrorPartBuilder(Part part) throws NXException, RemoteException
LinkedMirrorPartBuilder
part
- NXException
RemoteException
boolean isMirroredPart(Part part) throws NXException, RemoteException
part
- input partNXException
RemoteException
boolean isExactMirroredPart(Part part) throws NXException, RemoteException
part
- input partNXException
RemoteException
void setMirrorPartType(Part part, LinkedMirrorPartBuilder.MirrorPartTypeOption mirrorOption) throws NXException, RemoteException
part
- input partmirrorOption
- NXException
RemoteException
LinkedMirrorPartBuilder.MirrorPartTypeOption getMirrorPartType(Part part) throws NXException, RemoteException
part
- input partNXException
RemoteException
String getSourcePartNameOfMirrorPart(Part mirrorPart) throws NXException, RemoteException
mirrorPart
- input partNXException
RemoteException
void setPassword(Part part, String uAdminPassword, String uReadPassword, String uWritePassword, String uFullControlPassword) throws NXException, RemoteException
part
- uAdminPassword
- admin passworduReadPassword
- read passworduWritePassword
- write passworduFullControlPassword
- full control passwordNXException
RemoteException
void removePassword(Part part) throws NXException, RemoteException
part
- NXException
RemoteException
void setOpenPassword(String fileName, String password) throws NXException, RemoteException
fileName
- password
- open passwordNXException
RemoteException
PartCollection.ImportToolDesignPackageData importToolDesignPackage(String filename, String outputDirectory) throws NXException, RemoteException
filename
- Tool design package outputDirectory
- Output directory NXException
RemoteException
LinkedMirrorPartBuilder.MirrorCsysOption getMirrorCsysOptionOfMirrorPart(Part part) throws NXException, RemoteException
part
- input linked mirror part. Error is raised if input is not a linked mirror partNXException
RemoteException
PartCollection.MirrorPlaneDataOfMirrorPartData getMirrorPlaneDataOfMirrorPart(Part part) throws NXException, RemoteException
part
- input linked mirror part. Error is raised if input is not a linked mirror partNXException
RemoteException
void solveAllPostponedConstraints() throws NXException, RemoteException
NXException
RemoteException
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.