StockBuilder Class¶
-
class
NXOpen.Routing.
StockBuilder
¶ Bases:
NXOpen.Builder
Builder for creating/editing stocks.
Create Stock: Takes a set of segments and assign the selected the stock to the segments. The stock style and orientation settings are optional. Edit Stock: Takes in the selected stock to edit as input and redefines the stock with the new settings.
To create a new instance of this class, use
NXOpen.Routing.RouteManager.CreateStockBuilder()
Default values.
Property Value FlipStock 0 RemoveExistingStock 1 RotationValue.Value 0 StockStyle SimpleSolid SwapProfile 0 New in version NX6.0.0.
Properties¶
Property | Description |
---|---|
FlipStock | Returns or sets the stock flip flag |
GridTopologyEligibilityFlag | Returns or sets the grid topology eligibility flag. |
RemoveExistingStock | Returns or sets the remove existing stock flag. |
RotationValue | Returns the rotation value. |
SegmentCollector | Returns the routing object collector that collects segments to assign stock to. |
StockAnchor | Returns or sets the NXOpen.Routing.Anchor name associated with the stock. |
StockSettings | Returns or sets the stock settings for stock assignment. |
StockStyle | Returns or sets the stock style of the stock to assign |
SwapProfile | Returns or sets the profile swap flag. |
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. |
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¶
StockBuilderStockStyleType Enumeration | The stock display style |
Property Detail¶
FlipStock¶
-
StockBuilder.
FlipStock
¶ Returns or sets the stock flip flag
-------------------------------------
Getter Method
Signature
FlipStock()
Returns: Return type: bool New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
FlipStock(flipStock)
Parameters: flipStock (bool) – New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
GridTopologyEligibilityFlag¶
-
StockBuilder.
GridTopologyEligibilityFlag
¶ Returns or sets the grid topology eligibility flag.
When this flag is set, a non circular stock will produce bend faces in the bend regions instead of merged faces. This flag has no effect on circular stock.
-------------------------------------
Getter Method
Signature
GridTopologyEligibilityFlag()
Returns: Return type: bool New in version NX10.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
GridTopologyEligibilityFlag(gridOptionEligible)
Parameters: gridOptionEligible (bool) – New in version NX10.0.0.
License requirements: routing_base (“Routing Basic”)
RemoveExistingStock¶
-
StockBuilder.
RemoveExistingStock
¶ Returns or sets the remove existing stock flag.
If set to TRUE the existing stock on the path will be removed when assigning new stock.
-------------------------------------
Getter Method
Signature
RemoveExistingStock()
Returns: Return type: bool New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
RemoveExistingStock(removeStock)
Parameters: removeStock (bool) – New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
RotationValue¶
-
StockBuilder.
RotationValue
¶ Returns the rotation value.
Determines the rotation angle of the stock.
-------------------------------------
Getter Method
Signature
RotationValue()
Returns: Return type: NXOpen.Expression
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
SegmentCollector¶
-
StockBuilder.
SegmentCollector
¶ Returns the routing object collector that collects segments to assign stock to.
-------------------------------------
Getter Method
Signature
SegmentCollector()
Returns: Return type: NXOpen.Routing.RouteObjectCollector
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
StockAnchor¶
-
StockBuilder.
StockAnchor
¶ Returns or sets the
NXOpen.Routing.Anchor
name associated with the stock.-------------------------------------
Getter Method
Signature
StockAnchor()
Returns: Return type: str New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
StockAnchor(anchorName)
Parameters: anchorName (str) – New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
StockSettings¶
-
StockBuilder.
StockSettings
¶ Returns or sets the stock settings for stock assignment.
-------------------------------------
Getter Method
Signature
StockSettings()
Returns: Return type: NXOpen.Routing.PathStockBuilder
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
StockSettings(stockBuilder)
Parameters: stockBuilder ( NXOpen.Routing.PathStockBuilder
) –New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
StockStyle¶
-
StockBuilder.
StockStyle
¶ Returns or sets the stock style of the stock to assign
-------------------------------------
Getter Method
Signature
StockStyle()
Returns: Return type: NXOpen.Routing.StockBuilderStockStyleType
New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
StockStyle(stockStyle)
Parameters: stockStyle ( NXOpen.Routing.StockBuilderStockStyleType
) –New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
SwapProfile¶
-
StockBuilder.
SwapProfile
¶ Returns or sets the profile swap flag.
Determines whether the profile should be at the path start or end.
-------------------------------------
Getter Method
Signature
SwapProfile()
Returns: Return type: bool New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------
Setter Method
Signature
SwapProfile(swapProfile)
Parameters: swapProfile (bool) – New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
Method Detail¶
Validate¶
-
StockBuilder.
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.