DynamicSectionCollection Class

class NXOpen.Display.DynamicSectionCollection

Bases: object

Represents a collection of dynamic section objects

To obtain an instance of this class, refer to NXOpen.BasePart

New in version NX6.0.0.

Methods

Method Description
CopySections Copies the specified dynamic sections in the part.
CreateSectionBuilder Creates a NXOpen.Display.DynamicSectionBuilder object if the section is None.
DeleteSections Deletes the specified dynamic sections in the part.
FindObject Finds the NXOpen.Display.DynamicSection with the given identifier as recorded in a journal.
MoveToDefaultLayer Moves the specified dynamic sections in the part to default layer.

Method Detail

CopySections

DynamicSectionCollection.CopySections

Copies the specified dynamic sections in the part.

A copy of each specified dynamic section will be created and then added to the part. It is ensured that each dynamic section object in the part has a unique name. Hence, it is possible that the name of a pasted section object is different from that of the input section object if its name clashes with an existing section object in the part.

The section objects being copied must have been loaded in the memory. Otherwise this method will throw an exception.

Signature CopySections(sections, deleteOriginals)

Parameters:
  • sections (list of NXOpen.Display.DynamicSection) – The objects to be pasted in the part
  • deleteOriginals (bool) – Flag indicating whether the input sections should be deleted
Returns:

Copied section objects in the part.

Return type:

list of NXOpen.Display.DynamicSection

New in version NX6.0.0.

License requirements: None.

CreateSectionBuilder

DynamicSectionCollection.CreateSectionBuilder

Overloaded method CreateSectionBuilder

  • CreateSectionBuilder(section, view)
  • CreateSectionBuilder(section)
  • CreateSectionBuilder(view)

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

Creates a NXOpen.Display.DynamicSectionBuilder object if the section is None. Otherwise, a Section object will be edited.

The specified view can be None, in which case the section object is not activated in any view.

Signature CreateSectionBuilder(section, view)

Parameters:
Returns:

Return type:

NXOpen.Display.DynamicSectionBuilder

New in version NX6.0.0.

License requirements: None.

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

Creates a NXOpen.Display.DynamicSectionBuilder object that is used to edit a section object in the specified view. If no section object is available for the view, then a new one is created.

The specified view can not be None, otherwise an exception will be raised.

Signature CreateSectionBuilder(view)

Parameters:view (NXOpen.ModelingView) –
Returns:
Return type:NXOpen.Display.DynamicSectionBuilder

New in version NX6.0.0.

License requirements: None.

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

DeleteSections

DynamicSectionCollection.DeleteSections

Deletes the specified dynamic sections in the part.

All views in which the dynamic sections were active are updated to reflect the change. An update will be performed to remove deleted objects.

Signature DeleteSections(addUndoMark, sections)

Parameters:
  • addUndoMark (bool) – Determines if a visible undo mark is added
  • sections (list of NXOpen.Display.DynamicSection) – The dynamic sections to be deleted

New in version NX8.0.0.

License requirements: None.

FindObject

DynamicSectionCollection.FindObject

Finds the NXOpen.Display.DynamicSection with the given identifier as recorded in a journal.

An object may not return the same value as its JournalIdentifier in different versions of the software. However newer versions of the software should find the same object when FindObject is passed older versions of its journal identifier. In general, this method should not be used in handwritten code and exists to support record and playback of journals.

An exception will be thrown if no object can be found with the given journal identifier.

Signature FindObject(journalIdentifier)

Parameters:journalIdentifier (str) – Identifier to be found
Returns:Section found
Return type:NXOpen.Display.DynamicSection

New in version NX6.0.0.

License requirements: None.

MoveToDefaultLayer

DynamicSectionCollection.MoveToDefaultLayer

Moves the specified dynamic sections in the part to default layer.

The default settings are obtained from the view sectioning customer defaults.

Signature MoveToDefaultLayer(dynamicSections)

Parameters:dynamicSections (list of NXOpen.Display.DynamicSection) – The dynamic sections to be modified

New in version NX9.0.0.

License requirements: None.