StockBuilder Class¶
-
class
NXOpen.Routing.StockBuilder¶ Bases:
NXOpen.BuilderBuilder 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
FlipStockReturns: Return type: bool New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
FlipStockParameters: 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
GridTopologyEligibilityFlagReturns: Return type: bool New in version NX10.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
GridTopologyEligibilityFlagParameters: 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
RemoveExistingStockReturns: Return type: bool New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
RemoveExistingStockParameters: 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
RotationValueReturns: Return type: NXOpen.ExpressionNew 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
SegmentCollectorReturns: Return type: NXOpen.Routing.RouteObjectCollectorNew in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
StockAnchor¶
-
StockBuilder.StockAnchor¶ Returns or sets the
NXOpen.Routing.Anchorname associated with the stock.-------------------------------------Getter Method
Signature
StockAnchorReturns: Return type: str New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
StockAnchorParameters: 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
StockSettingsReturns: Return type: NXOpen.Routing.PathStockBuilderNew in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
StockSettingsParameters: 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
StockStyleReturns: Return type: NXOpen.Routing.StockBuilderStockStyleTypeNew in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
StockStyleParameters: 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
SwapProfileReturns: Return type: bool New in version NX6.0.0.
License requirements: routing_base (“Routing Basic”)
-------------------------------------Setter Method
Signature
SwapProfileParameters: 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.