PathStockBuilder Class

class NXOpen.Routing.PathStockBuilder

Bases: NXOpen.Builder

Assigns stocks to segments based of users critiera and the current default stock.

To create a new instance of this class, use NXOpen.Routing.RouteManager.CreatePathStockBuilder()

New in version NX5.0.0.

Properties

Property Description
AssignStockMethod Returns or sets the method to determine which stock to assign.
DiameterValue Returns or sets the diameter value to use for the Routing.PathStockBuilderAssignMethod.DiameterValue method of stock assignment.
FlatOvalHeight Returns the height value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FlatOval < Routing.PathStockBuilderAssignMethod>` method of stock assignment.
FlatOvalRotation Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FlatOval < Routing.PathStockBuilderAssignMethod>` method of stock assignment
FlatOvalWidth Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FlatOval < Routing.PathStockBuilderAssignMethod>` method of stock assignment
RectangularHeight Returns the height value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.Rectangular < Routing.PathStockBuilderAssignMethod>` method of stock assignment.
RectangularRotation Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.Rectangular < Routing.PathStockBuilderAssignMethod>` method of stock assignment
RectangularWidth Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.Rectangular < Routing.PathStockBuilderAssignMethod>` method of stock assignment
StartObject Returns or sets the start object to use for the Routing.PathStockBuilderAssignMethod.FromStartObject method of stock assignment.
StockType Returns or sets the type of stock being assigned.
Tag Returns the Tag for this object.

Methods

Method Description
AssignStock Assigns stock using the method defined by this stock builder object.
Commit Commits any edits that have been applied to the builder.
DefaultOrientationAlignmentEnabled Get the flag if non-circular stock default alignment is enabled
Destroy Deletes the builder, and cleans up any objects created by the builder.
EnableDefaultOrientationAlignment Set the flag if it is to enable non-circular stock default alignment or not
GetCommittedObjects For builders that create more than one object, this method returns the objects that are created by commit.
GetFlatOvalDimensions Get the FlatOval height and width value to use for the FlatOval space reservation assignment
GetObject Returns the object currently being edited by this builder.
GetParts Get the parts to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FromParts < Routing.PathStockBuilderAssignMethod>` method of stock assignment
GetRectangularDimensions Get the rectangular height and width value to use for the rectangular space reservation assignment
GetSpecifiedStock Returns the specified stock to use for the Routing.PathStockBuilderAssignMethod.SpecifiedStock method of stock assignment.
IsRotationOverriden Get the rotation value overwritten flag
OverrideRotation Set the rotation value overwritten flag
SetFlatOvalDimensions Set the FlatOval height and width value for the FlatOval space reservation assignment
SetParts Set the parts to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FromParts < Routing.PathStockBuilderAssignMethod>` method of stock assignment
SetRectangularDimensions Set the rectangular height and width value for the rectangular space reservation assignment
SetSelectedStock Set the selected stock
SetSpecifiedStock Sets the specified stock to use for the Routing.PathStockBuilderAssignMethod.SpecifiedStock method of stock assignment.
SettingsChanged Notify the builder that the Routing preferred stock has been modified.
ShowResults Updates the model to reflect the result of an edit to the model for all builders that support showing results.
UpdateExistingStock Updates an existing routing stock with settings stored in the builder.
Validate Validate whether the inputs to the component are sufficient for commit to be called.

Enumerations

PathStockBuilderAssignMethod Enumeration Determines how to choose which stock to assign.
PathStockBuilderAssignStockType Enumeration Determines the type of stock being assigned.

Property Detail

AssignStockMethod

PathStockBuilder.AssignStockMethod

Returns or sets the method to determine which stock to assign.

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

Getter Method

Signature AssignStockMethod

Returns:
Return type:NXOpen.Routing.PathStockBuilderAssignMethod

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

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

Setter Method

Signature AssignStockMethod

Parameters:method (NXOpen.Routing.PathStockBuilderAssignMethod) –

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

DiameterValue

PathStockBuilder.DiameterValue

Returns or sets the diameter value to use for the Routing.PathStockBuilderAssignMethod.DiameterValue method of stock assignment.

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

Getter Method

Signature DiameterValue

Returns:
Return type:float

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

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

Setter Method

Signature DiameterValue

Parameters:val (float) –

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

FlatOvalHeight

PathStockBuilder.FlatOvalHeight

Returns the height value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FlatOval < Routing.PathStockBuilderAssignMethod>` method of stock assignment.

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

Getter Method

Signature FlatOvalHeight

Returns:
Return type:NXOpen.Expression

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

FlatOvalRotation

PathStockBuilder.FlatOvalRotation

Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FlatOval < Routing.PathStockBuilderAssignMethod>` method of stock assignment

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

Getter Method

Signature FlatOvalRotation

Returns:
Return type:NXOpen.Expression

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

FlatOvalWidth

PathStockBuilder.FlatOvalWidth

Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FlatOval < Routing.PathStockBuilderAssignMethod>` method of stock assignment

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

Getter Method

Signature FlatOvalWidth

Returns:
Return type:NXOpen.Expression

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

RectangularHeight

PathStockBuilder.RectangularHeight

Returns the height value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.Rectangular < Routing.PathStockBuilderAssignMethod>` method of stock assignment.

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

Getter Method

Signature RectangularHeight

Returns:
Return type:NXOpen.Expression

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

RectangularRotation

PathStockBuilder.RectangularRotation

Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.Rectangular < Routing.PathStockBuilderAssignMethod>` method of stock assignment

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

Getter Method

Signature RectangularRotation

Returns:
Return type:NXOpen.Expression

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

RectangularWidth

PathStockBuilder.RectangularWidth

Returns the Width value to use for the :py:class:` Routing.PathStockBuilderAssignMethod.Rectangular < Routing.PathStockBuilderAssignMethod>` method of stock assignment

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

Getter Method

Signature RectangularWidth

Returns:
Return type:NXOpen.Expression

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

StartObject

PathStockBuilder.StartObject

Returns or sets the start object to use for the Routing.PathStockBuilderAssignMethod.FromStartObject method of stock assignment.

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

Getter Method

Signature StartObject

Returns:
Return type:NXOpen.NXObject

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

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

Setter Method

Signature StartObject

Parameters:startObject (NXOpen.NXObject) –

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

StockType

PathStockBuilder.StockType

Returns or sets the type of stock being assigned.

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

Getter Method

Signature StockType

Returns:
Return type:NXOpen.Routing.PathStockBuilderAssignStockType

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

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

Setter Method

Signature StockType

Parameters:stockType (NXOpen.Routing.PathStockBuilderAssignStockType) –

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

Method Detail

AssignStock

PathStockBuilder.AssignStock

Assigns stock using the method defined by this stock builder object.

Signature AssignStock(segments)

Parameters:segments (list of NXOpen.Routing.ISegment) –

New in version NX5.0.0.

License requirements: routing_base (“Routing Basic”)

DefaultOrientationAlignmentEnabled

PathStockBuilder.DefaultOrientationAlignmentEnabled

Get the flag if non-circular stock default alignment is enabled

Signature DefaultOrientationAlignmentEnabled()

Returns:
Return type:bool

New in version NX9.0.3.

License requirements: routing_base (“Routing Basic”)

EnableDefaultOrientationAlignment

PathStockBuilder.EnableDefaultOrientationAlignment

Set the flag if it is to enable non-circular stock default alignment or not

Signature EnableDefaultOrientationAlignment(suggestRotationAngle)

Parameters:suggestRotationAngle (bool) –

New in version NX9.0.3.

License requirements: routing_base (“Routing Basic”)

GetFlatOvalDimensions

PathStockBuilder.GetFlatOvalDimensions

Get the FlatOval height and width value to use for the FlatOval space reservation assignment

Signature GetFlatOvalDimensions()

Returns:a tuple
Return type:A tuple consisting of (height, width) height is a float. width is a float.

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

GetParts

PathStockBuilder.GetParts

Get the parts to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FromParts < Routing.PathStockBuilderAssignMethod>` method of stock assignment

Signature GetParts()

Returns:Part table parts to get

stock characteristics.

Return type:list of NXOpen.Assemblies.Component

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

GetRectangularDimensions

PathStockBuilder.GetRectangularDimensions

Get the rectangular height and width value to use for the rectangular space reservation assignment

Signature GetRectangularDimensions()

Returns:a tuple
Return type:A tuple consisting of (height, width) height is a float. width is a float.

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

GetSpecifiedStock

PathStockBuilder.GetSpecifiedStock

Returns the specified stock to use for the Routing.PathStockBuilderAssignMethod.SpecifiedStock method of stock assignment.

Signature GetSpecifiedStock()

Returns:Characteristic list used to find the appropriate

Routing.StockData for building the stock. See Routing.StockDataCollection.CreateStockData(). :rtype: NXOpen.Routing.CharacteristicList

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

IsRotationOverriden

PathStockBuilder.IsRotationOverriden

Get the rotation value overwritten flag

Signature IsRotationOverriden()

Returns:
Return type:bool

New in version NX9.0.3.

License requirements: routing_base (“Routing Basic”)

OverrideRotation

PathStockBuilder.OverrideRotation

Set the rotation value overwritten flag

Signature OverrideRotation(overrideRotation)

Parameters:overrideRotation (bool) –

New in version NX9.0.3.

License requirements: routing_base (“Routing Basic”)

SetFlatOvalDimensions

PathStockBuilder.SetFlatOvalDimensions

Set the FlatOval height and width value for the FlatOval space reservation assignment

Signature SetFlatOvalDimensions(height, width)

Parameters:
  • height (float) –
  • width (float) –

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

SetParts

PathStockBuilder.SetParts

Set the parts to use for the :py:class:` Routing.PathStockBuilderAssignMethod.FromParts < Routing.PathStockBuilderAssignMethod>` method of stock assignment

Signature SetParts(parts)

Parameters:parts (list of NXOpen.Assemblies.Component) – Part table parts to get stock characteristics.

New in version NX7.5.0.

License requirements: routing_base (“Routing Basic”)

SetRectangularDimensions

PathStockBuilder.SetRectangularDimensions

Set the rectangular height and width value for the rectangular space reservation assignment

Signature SetRectangularDimensions(height, width)

Parameters:
  • height (float) –
  • width (float) –

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

SetSelectedStock

PathStockBuilder.SetSelectedStock

Set the selected stock

Signature SetSelectedStock(stock)

Parameters:stock (NXOpen.Routing.Stock) – Selected Stock

New in version NX8.0.0.

License requirements: routing_base (“Routing Basic”)

SetSpecifiedStock

PathStockBuilder.SetSpecifiedStock

Overloaded method SetSpecifiedStock

  • SetSpecifiedStock(stockPart)
  • SetSpecifiedStock(stockPart, appliedCharx)

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

Sets the specified stock to use for the Routing.PathStockBuilderAssignMethod.SpecifiedStock method of stock assignment.

Signature SetSpecifiedStock(stockPart)

Parameters:stockPart (NXOpen.Routing.CharacteristicList) – Characteristic list used to find the appropriate Routing.StockData for building the stock. See Routing.StockDataCollection.CreateStockData().

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

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

Sets the specified stock and applied characteristics to use for the Routing.PathStockBuilderAssignMethod.SpecifiedStock method of stock assignment.

Signature SetSpecifiedStock(stockPart, appliedCharx)

Parameters:

New in version NX6.0.4.

License requirements: routing_base (“Routing Basic”)

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

SettingsChanged

PathStockBuilder.SettingsChanged

Notify the builder that the Routing preferred stock has been modified.

This updates the builder so that it now uses the new preferred stock do determine which stock to assign.

Signature SettingsChanged()

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

UpdateExistingStock

PathStockBuilder.UpdateExistingStock

Updates an existing routing stock with settings stored in the builder.

Signature UpdateExistingStock(existingStock)

Parameters:existingStock (NXOpen.Routing.Stock) – Existing Stock

New in version NX6.0.0.

License requirements: routing_base (“Routing Basic”)

Validate

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