FeatureBuilder Class

class NXOpen.Features.FeatureBuilder

Bases: NXOpen.Builder

Represents a Feature Builder to be used in the creation and modification of features.

Feature Builders manage the steps needed to correctly create features on a part.

This is an abstract class, and cannot be instantiated.

New in version NX3.0.0.

Properties

Property Description
ParentFeatureInternal Returns or sets whether or not the latest timestamped parent feature of this feature should be made internal
PatchSolutionFlag Returns or sets the patch solution flag
PatchSurfaceFilename Returns or sets the patch surface filename
SurroundingPatchSurfaceFilename Returns or sets the surrounding patch surface filename
Tag Returns the Tag for this object.

Methods

Method Description
Commit Commits any edits that have been applied to the builder.
CommitFeature Commits the feature parameters and creates the feature @return
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.
GetFeature Returns the feature currently being edited by this builder.
GetObject Returns the object currently being edited by this builder.
HideInternalParentFeatureAfterEdit Re-suppress an internal parent feature (a slave feature) after it has been edited.
SetParentFeatureInternal Set the parent features which would be internal or slaves to the feature being created or commited
ShowInternalParentFeatureForEdit Unsuppress an internal parent feature (a slave feature) so it can be edited.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UnsetParentFeatureInternal Set the internal parent feature of the feature being edited to external
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Property Detail

ParentFeatureInternal

FeatureBuilder.ParentFeatureInternal

Returns or sets whether or not the latest timestamped parent feature of this feature should be made internal

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

Getter Method

Signature ParentFeatureInternal()

Returns:True = internal, False = external
Return type:bool

New in version NX5.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

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

Setter Method

Signature ParentFeatureInternal(isInternal)

Parameters:isInternal (bool) – True = internal, False = external

New in version NX5.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

PatchSolutionFlag

FeatureBuilder.PatchSolutionFlag

Returns or sets the patch solution flag

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

Getter Method

Signature PatchSolutionFlag()

Returns:
Return type:bool

New in version NX8.0.1.

License requirements: None.

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

Setter Method

Signature PatchSolutionFlag(optionValue)

Parameters:optionValue (bool) –

New in version NX8.0.1.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

PatchSurfaceFilename

FeatureBuilder.PatchSurfaceFilename

Returns or sets the patch surface filename

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

Getter Method

Signature PatchSurfaceFilename()

Returns:
Return type:str

New in version NX8.0.1.

License requirements: None.

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

Setter Method

Signature PatchSurfaceFilename(surfaceFilename)

Parameters:surfaceFilename (str) –

New in version NX8.0.1.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

SurroundingPatchSurfaceFilename

FeatureBuilder.SurroundingPatchSurfaceFilename

Returns or sets the surrounding patch surface filename

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

Getter Method

Signature SurroundingPatchSurfaceFilename()

Returns:
Return type:str

New in version NX8.0.1.

License requirements: None.

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

Setter Method

Signature SurroundingPatchSurfaceFilename(surroundingSurfaceFilename)

Parameters:surroundingSurfaceFilename (str) –

New in version NX8.0.1.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

Method Detail

CommitFeature

FeatureBuilder.CommitFeature

Commits the feature parameters and creates the feature

Signature CommitFeature()

Returns:
Return type:NXOpen.Features.Feature

New in version NX3.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR geometric_tol (“GDT”)

GetFeature

FeatureBuilder.GetFeature

Returns the feature currently being edited by this builder.

If a new feature is being created, and the builder has not yet been commited, returns None.

Signature GetFeature()

Returns:
Return type:NXOpen.Features.Feature

New in version NX4.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR cam_base (“CAM BASE”) OR geometric_tol (“GDT”)

HideInternalParentFeatureAfterEdit

FeatureBuilder.HideInternalParentFeatureAfterEdit

Re-suppress an internal parent feature (a slave feature) after it has been edited.

Note that this method will do nothing if ShowInternalParentFeatureForEdit has not previously been called. Also note that this action will happen automatically when the feature builder is destroyed so calling this method is not strictly necessary.

Signature HideInternalParentFeatureAfterEdit(parentFeature)

Parameters:parentFeature (NXOpen.Features.Feature) – Slave feature

New in version NX8.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

SetParentFeatureInternal

FeatureBuilder.SetParentFeatureInternal

Overloaded method SetParentFeatureInternal

  • SetParentFeatureInternal(parentFeature)
  • ParentFeatureInternal(isInternal)

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

Set the parent features which would be internal or slaves to the feature being created or commited

Signature SetParentFeatureInternal(parentFeature)

Parameters:parentFeature (NXOpen.Features.Feature) – Slave feature

New in version NX6.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

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

Returns or sets whether or not the latest timestamped parent feature of this feature should be made internal

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

Getter Method

Signature ParentFeatureInternal(isInternal)

Parameters:isInternal (bool) – True = internal, False = external

New in version NX5.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

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

Setter Method

Signature ParentFeatureInternal(isInternal)

Parameters:isInternal (bool) – True = internal, False = external

New in version NX5.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”) -------------------------------------

ShowInternalParentFeatureForEdit

FeatureBuilder.ShowInternalParentFeatureForEdit

Unsuppress an internal parent feature (a slave feature) so it can be edited.

Signature ShowInternalParentFeatureForEdit(parentFeature)

Parameters:parentFeature (NXOpen.Features.Feature) – Slave feature

New in version NX8.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

UnsetParentFeatureInternal

FeatureBuilder.UnsetParentFeatureInternal

Set the internal parent feature of the feature being edited to external

Signature UnsetParentFeatureInternal(parentFeature)

Parameters:parentFeature (NXOpen.Features.Feature) – Slave feature

New in version NX6.0.0.

License requirements: solid_modeling (“SOLIDS MODELING”) OR geometric_tol (“GDT”)

Validate

FeatureBuilder.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.