All Frameworks  Object Hierarchy  This Framework  Indexes   

MachiningProcess (Object)

MachiningProcess defines a set of properties and methods to apply a Machining Process to a geometrical feature (design or manufacturing).
It refers to a Machining Process which has been defined in the Machining Process view of a CATProcess file In the VB macro, be sure that the active document is the target document where are located the insertion level and where the instantiated activities will be created

Property Index

InsertionLevel
This property defines the insertion level in the program receiving the resulting operations.

Method Index

GetActivities
This method gets the Manufacturing Activities referenced by the Machining Process.
InsertActivity
This method creates and inserts a Manufacturing Activity in the Machining Process.
InstantiateInProductContext
This method enables to apply a Machining Process to a given feature by taking into account the product from which it belongs to.
Instantiate
This method enables to apply a Machining Process to an any feature.

Properties


o Property InsertionLevel() As
This property defines the insertion level in the program receiving the resulting operations. It can be set to either the Manufacturing Program or one the Manufacturing Activities of the Manufacturing Program.
Example:
The following example sets the InsertionLevel property to the first Manufacturing Program as ManufacturingActivity Activity for the mpReference MachiningProcess which will be used for the Machining Process application:
 ...
 Dim programReference As ManufacturingActivity
 Set programReference = ... 
 Dim mpReference As MachiningProcess
 Set mpReference = ...
 mpReference.InsertionLevel = programReference

Methods


o Func GetActivities() As
This method gets the Manufacturing Activities referenced by the Machining Process.
Parameters:
oMfgActivities
The Manufacturing Activities list
o Func InsertActivity( iActivityType,
iReferencedActivity) As
This method creates and inserts a Manufacturing Activity in the Machining Process.
Parameters:
iActivityType
The activity to be created type
iReferencedActivity
The insertion level in the machining process: the machining process itself to insert at the beginning of the Machining Process
oManufacturingActivity
The inserted activity
Example:
The following example executes the InsertActivity method to add a drilling operation to the mpReference MachiningProcess
 ...
 Dim mpReference As MachiningProcess
 Set mpReference = ...
 ...
 Dim iActivityType As CATBSTR
 Set iActivityType = Drilling
 Dim iReferencedActivity As CATIAManufacturingActivity
 Set iReferencedActivity = MachiningProcess
 Dim oManufacturingActivity As CATIAManufacturingActivity
 mpReference.InsertActivity(iActivityType,iReferencedActivity,oManufacturingActivity)
o Sub InstantiateInProductContext( iFeature,
iProduct)
This method enables to apply a Machining Process to a given feature by taking into account the product from which it belongs to. This one has to be available for all Manufacturing Activities inside the Machining Process. At the end of the Machining Process application, the InsertionLevel property is set to the last created Manufacturing Activity in the Manufacturing program
Parameters:
iFeature
The feature on which the Machining Process is instantiated
iProduct
The product containing the feature.
Example:
The following example executes the Instantiate method to apply the mpReference MachiningProcess to a iDesignFeature selected feature
 ...
 Dim mpReference As MachiningProcess
 Set mpReference = ...
 ...
 Dim iDesignFeature As AnyObject
 Set iDesignFeature = ...
 ...
 Dim iProduct As Product
 Set iProduct = ...
 ...
 mpReference.Instantiate(iDesignFeature,iProduct)
o Sub Instantiate( iFeature)
This method enables to apply a Machining Process to an any feature. This one has to be available for all Manufacturing Activities inside the Machining Process. At the end of the Machining Process application, the InsertionLevel property is set to the last created Manufacturing Activity in the Manufacturing program
Example:
The following example executes the Instantiate method to apply the mpReference MachiningProcess to a DesignFeature selected feature
 ...
 Dim mpReference As MachiningProcess
 Set mpReference = ...
 ...
 Dim DesignFeature As AnyObject
 Set DesignFeature = ...
 ...
 mpReference.Instantiate(DesignFeature)

Copyright © 2003, Dassault Systèmes. All rights reserved.