StockDataCollection Class¶
-
class
NXOpen.Routing.StockDataCollection¶ Bases:
objectRepresents a collection of
NXOpen.Routing.StockDataobjects.To obtain an instance of this class, refer to
NXOpen.Routing.RouteManagerNew in version NX4.0.0.
Methods¶
| Method | Description |
|---|---|
| CreateStockData | Creates (or finds an existing NXOpen.Routing.StockData) object in the work part that has the characteristics specified by the input list of characteristic values. |
| RemoveUnusedStockData | Logs for deletion any NXOpen.Routing.StockData objects in the input part not referenced by any NXOpen.Routing.Stock, NXOpen.Routing.Wire and NXOpen.Routing.CrossSection not referenced by any NXOpen.Routing.StockData. |
Method Detail¶
CreateStockData¶
-
StockDataCollection.CreateStockData¶ Overloaded method CreateStockData
CreateStockData(values)CreateStockData()
-------------------------------------Creates (or finds an existing
NXOpen.Routing.StockData) object in the work part that has the characteristics specified by the input list of characteristic values. Creates the stock by copying the stock defined in the qualified part to the work part. The qualified stock part is specified by the PART_NAME or MEMBER_NAME in the list. If there is no PART_NAME or MEMBER_NAME a stock data, the OD or WIDTH/HEIGHT values are used to generate either a circular or rectangular stock data.Use this routine to create stock data’s in the work part in order to create stocks. Use
Routing.RouteManager.PartTypeFlag()to create a qualified stock data part.Example Use:
values = theSession.Preferences.RoutingApplicationView.PartPreferences.PartLibrary.CreateCriteria ( ); values.SetCharacteristic ( “OD”, 10.0 ); stock_data = workPart.RouteManager.StockDataCollection.CreateStockData ( values ); stocks = workPart.RouteManager.StockCollection.CreateStock ( stock_data, anchor, cross_section, segments ); workPart.RouteManager.SetPartTypeFlag( Routing.RouteManager.PartType.Stock );
Signature
CreateStockData(values)Parameters: values ( NXOpen.Routing.CharacteristicList) –Returns: Return type: NXOpen.Routing.StockDataNew in version NX4.0.0.
License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)
-------------------------------------Creates a new stock data in the work part. The new stock data contains all of the
NXOpen.Routing.CrossSectionandNXOpen.Routing.Anchorobjects in the work part. After calling this routine callRouting.RouteManager.PartTypeFlag()toNXOpen.Routing.RouteManagerPartType.Stock,NXOpen.Routing.RouteManagerPartType.Overstock, orNXOpen.Routing.RouteManagerPartType.Fillerto properly qualify this as a stock definition part.Signature
CreateStockData()Returns: Return type: NXOpen.Routing.StockDataNew in version NX4.0.0.
License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)
-------------------------------------
RemoveUnusedStockData¶
-
StockDataCollection.RemoveUnusedStockData¶ Logs for deletion any
NXOpen.Routing.StockDataobjects in the input part not referenced by anyNXOpen.Routing.Stock,NXOpen.Routing.WireandNXOpen.Routing.CrossSectionnot referenced by anyNXOpen.Routing.StockData.Signature
RemoveUnusedStockData()New in version NX5.0.0.
License requirements: routing_advanced (“Routing Advanced”), routing_base (“Routing Basic”)