Properties
- Property Comment() As
-
Return the Comment linked to a Manufacturing Operation.
- Example:
- The following example returns the Comment ThisComment linked to a manufacturing operation CurrentMo
Set ThisComment = CurrentMo.Comment
Methods
- Sub AddClearance( iTypeMacro, iA, iB, iC, iD)
-
Add a 'clearance to a plane' path to a Manufacturing Operation.
- Example:
- The following example add a path (clerarance) on approach
macro of operation
call Operation.AddClearance("Approach", A, B, C, D)
- Sub AddDistanceAlongAlineMotion( iType, iDistance, iLine, iProduct)
-
Add a path 'distance along a line' to a Manufacturing Operation.
- Example:
- The following example add a path (distance along a line) on the approach group of path of the Linking
macro of operation
call Operation.AddDistanceAlongAlineMotion("LinkingApproach", distance, iLine, iProduct)
- Sub AddDistanceAlongAlineMotionFeed( iType, iDistance, iLine, iProduct, iFeedrateType, iFeedrateValue)
-
Add a path 'distance along a line' with Feedrate info to a Manufacturing Operation.
- Parameters:
-
- iFeedrateType
- Legal values: iFeedrateType can be
- "None"
- "Machining"
- "Approach"
- "Retract"
- "RAPID"
- "Local"
- iFeedrateValue
- feedrate Value in MKS units : m/s if linear feedrate, or m/turn if angular feedrate (take into account only if iFeedrateType = "Local")
- Example:
- The following example add a path (distance along a line) on the approach group of path of the Linking
macro of operation
call Operation.AddDistanceAlongAlineMotionFeed("LinkingApproach", distance, iLine, iProduct, iFeedrateType, iFeedrateValue)dd>
- Example:
- The following example add a path (distance along axis) on the approach group of path of the Linking
macro of operation
call Operation.AddDistanceAlongAxis("LinkingApproach", distance)
- Parameters:
-
- iFeedrateType
- Legal values: iFeedrateType can be
- "None"
- "Machining"
- "Approach"
- "Retract"
- "RAPID"
- "Local"
- iFeedrateValue
- feedrate Value in MKS units : m/s if linear feedrate, or m/turn if angular feedrate (take into account only if iFeedrateType = "Local")
- Example:
- The following example add a path (distance along axis) on the approach group of path of the Linking
macro of operation
call Operation.AddDistanceAlongAxisFeed("LinkingApproach", distance, iFeedrateType, iFeedrateValue)dd>
- Example:
- The following example add a path (goto horizontal) on approach
macro of operation
call Operation.AddGotoHorizontal("Approach", distance, angle1, angle2)
- Example:
- The following example add a path (goto a point ) on approach
macro of operation
call Operation.AddMotionGoToAPoint("Approach", iPoint, iProduct )
- Parameters:
-
- iFeedrateType
- Legal values: iFeedrateType can be
- "None"
- "Machining"
- "Approach"
- "Retract"
- "RAPID"
- "Local"
- iFeedrateValue
- feedrate Value in MKS units : m/s if linear feedrate, or m/turn if angular feedrate (take into account only if iFeedrateType = "Local")
- Example:
- The following example add a path (goto a point ) on approach
macro of operation
call Operation.AddMotionGoToAPointFeed("Approach", iPoint, iProduct, iFeedrateType, iFeedrateValue)dd>
- Example:
- The following example add a path (goto a plane with axial move ) on approach
macro of operation
call Operation.AddMotionToAPlane("Approach", 1, iPlane, iProduct) - Example:
- The following example add a path (goto a plane with perpendicular move ) on approach
macro of operation
call Operation.AddMotionToAPlane("Approach", 0, iPlane, iProduct)
- Example:
- The following example add a path (PP Words) on the retract group of path of the Linking
macro of operation
call Operation.AddPPWords("LinkingRetract", "PP Words example")
- Example:
- The following example retrieves in Offset the attribute
OriginOffset of Manufacturing Operation firstOperation
Set Offset = firstOperation.GetAttribute(OriginOffset)
- Example:
- The following example Retrieves in RapidFeed the attribute
MfgRapidFeed of Manufacturing Operation firstOperation
Set RapidFeed = firstOperation.GetAttribute(MfgRapidFeed)
- Example:
- The following example Retrieves in firstOperation the machinable feature
Feature
call firstOperation.GetFeature(Feature)
- Parameters:
-
- iType
- Determines if the method works on Feed Rate or Spindle Speed Legal values: iType can be
- "FEEDRATE"
- "SPINDLESPEED"
- Returns:
- oAutoUpdate Auto update status
- Example:
- The following example checks the status of AutoUpdate for Feed Rate
- Dim isAutoUpdateEnabled As Boolean
- isAutoUpdateEnabled = firstOperation.GetFeedSpeedAutoUpdate("FEEDRATE")
- See interface CATIAMfgToolMotions for methods available on the list
- The following example extract the tool motions of operation SeqMO in the MfgToolMotions
- list TMList2 .
- list TMList2 .
- Example: Dim TMList2 As MfgToolMotions Set TMList2 = SeqMO.GetListOfToolMotions Dim Test2 As ManufacturingToolMotion Set Test2 = TMList2.GetElement(1)
- Example:
- The following example Retrieves in firstOperation the manufacturing feature
Feature
Set Feature = firstOperation.GetManufacturingFeature
- Example:
- The following example Retrieves in A,B,C,D the equation
Ax + By + Cz + D = 0 of Manufacturing Pocket Operation firstOperation
Dim A Set A = firstOperation.GetMfgBparamTopPln
- Example:
- The following example Retrieves in Diam the diameter
of the axial manufacturing feature linked to the operation firstOperation
Dim Diam Set Diam = firstOperation.GetMfgAxialFeatureDiameter
- Example:
- The following example Retrieves in A,B,C,D the equation
Ax + By + Cz + D = 0 of Manufacturing Pocket Operation firstOperation
Dim B Set B = firstOperation.GetMfgBparamTopPln
- Example:
- The following example Retrieves in A,B,C,D the equation
Ax + By + Cz + D = 0 of Manufacturing Pocket Operation firstOperation
Dim C Set C = firstOperation.GetMfgCparamTopPln
- Example:
- The following example Retrieves in A,B,C,D the equation
Ax + By + Cz + D = 0 of Manufacturing Pocket Operation firstOperation
Dim D Set D = firstOperation.GetMfgDparamTopPln
- Example:
- The following example Retrieves in X,Y,Z the coordinate
(X,Y,Z) of the Reference Point of the Drill Operation firstOperation
Dim oPositionArray(3) As CATSafeArrayVariant Call firstOperation.GetMfgFeaturePosition(oPositionArray) Assume this array is oPositionArray. It contains:
- oPositionArray[0],oPositionArray[1],oPositionArray[2]
- The X, Y, and Z direction vector components
- Example:
- The following example returns in oPositionArray
the coordinates of the feature position
Call firstOperation.GetMfgFeaturePosition(oCoord) x = oPositionArray[0] y = oPositionArray[1] z = oPositionArray[2]
- Func GetMfgFeatureXPosition() As
-
Retrieve the Coordinate of the Reference Point of a Drill Operation.
- Example:
- The following example Retrieves in X,Y,Z the coordinate
(X,Y,Z) of the Reference Point of the Drill Operation firstOperation
Dim X X = firstOperation.GetMfgFeatureXPosition
- Func GetMfgFeatureYPosition() As
-
Retrieve the Coordinate of the Reference Point of a Drill Operation.
- Example:
- The following example Retrieves in X,Y,Z the coordinate
(X,Y,Z) of the Reference Point of the Drill Operation firstOperation
Dim Y Y = firstOperation.GetMfgFeatureYPosition
- Func GetMfgFeatureZPosition() As
-
Retrieve the Coordinate of the Reference Point of a Drill Operation.
- Example:
- The following example Retrieves in X,Y,Z the coordinate
(X,Y,Z) of the Reference Point of the Drill Operation firstOperation
Dim Z Z = firstOperation.GetMfgFeatureZPosition
- Sub GetMfgTopPlane( oA, oB, oC, oD)
-
Retrieve the Equation of the Top Plane of a Pocket Operation.
- Example:
- The following example Retrieves in A,B,C,D the equation
Ax + By + Cz + D = 0 of Manufacturing Pocket Operation firstOperation
Call firstOperation.GetMfgTopPlane(A,B,C,D)
- Func GetPattern() As
-
Retrieve the Machining Pattern asociated to a Manufacturing Operation.
- Example:
- The following example Retrieves in firstOperation the machining pattern
Pattern
Set Pattern = firstOperation.GetPattern
- Func GetRadiusOnMacro( iMacroType) As
-
Retrieves radius attribute on the circular elementary macro motion on CIRCULAR MILLING
or THREAD MILLING operations ONLY.
- Parameters:
-
- iMacroType
- Legal values: iMacroType can be:
- "Approach", to get the radius on the Approach Macro
- "Retract", to get the radius on the Retract Macro
- "ReturnInALevelApproach", to get the radius on the Return in a level Macro (Approach)
- "ReturnInALevelRetract", to get the radius on the Return in a level Macro (Retract)
- "ReturnBetweenLevelsApproach", to get the radius on the Return between levels Macro (Approach)
- "ReturnBetweenLevelsRetract", to get the radius on the Return between levels Macro (Approach)
- oRadius
- Radius value. (expressed in millimeters)
- Example:
- The following example retrieves the radius on the circular motion
of the retract macro on the Circular Milling operation CircularMilling1
dim RadValue as double RadValue = CircularMilling1.GetRadiusOnMacro("Retract")
- Parameters:
-
- iGeometryType
- Legal values: iGeometryType can be:
- "StartElement", to get the Start element on Profile Contouring
- "EndElement", to get the End element on Profile Contouring
- oReference
- The relimiting geometry. dd>
- oProduct
- Product containing the relimiting geometry. dd>
- oOffset
- Offset set on the relimiting geometry. (expressed in millimeters) dd>
- oPosition
- Tool position set on the relimiting geometry.
Legal values: oPosition can be:- "IN"
- "ON"
- "OUT"
- Example:
- The following example gets the End relimiting element of the
Profile Contouring operation Contouring1
Call Contouring1.GetRelimitingGeometry("EndElement",RelimitingElement,PartMachined,Offset,Position)
- Parameters:
-
- oGeometryPosition
- Legal values: oGeometryPosition can be:
- "Outside", if the start point is outside the pocket contour
- "Inside", if the start point is inside the pocket contour
- oReference
- The start point geometry. dd>
- oProduct
- Product containing the start point geometry. dd>
- oOffset
- Offset set on the start point. (expressed in millimeters)
Offset has a meaning only if oGeometryPosition value is "Outside".
- Example:
- The following example gets the Start point geometry on the Pocketing operation Pocketing1
Call Pocketing1.GetStartPointGeometry(Position,Point1,Part,OffsetValue)
- Example:
- The following example Retrieves in MinToolLength and MinToolGage the values
of tool of Manufacturing Operation Operation
Call Operation.GetToolGage(MinToolLength,MinToolGage)
- Example:
- The following example Retrieves in oEndPoint the end point
of the Machining Operation Operation
Dim oEndPoint(2) call Operation.GetTrajectoryEndPointCoord(oEndPoint) x = oEndPoint(0) y = oEndPoint(1) z = oEndPoint(2)
- Example:
- The following example Retrieves in oStartPoint the start point
of the Machining Operation Operation
Dim oEndPoint(2) call Operation.GetTrajectoryStartPointCoord(oStartPoint) x = oStartPoint(0) y = oStartPoint(1) z = oStartPoint(2)
- Example:
- The following example imports after an operation Operation an NC File of type TYPE available in the file path PATH using the PP PPNAME if required.
Call Operation.ImportNCOutputOnProgram(TYPE,PATH,PPNAME)
- The available type for lathe sequential operation are :
- for GoStandard and GoGo tool motion iType = MfgSeqMotionLatheGoStd
- for GoDelta tool motion, iType = MfgSeqMotionLatheDelta
- for Indirv tool motion, iType = MfgSeqMotionLatheIndirv
- for Follow tool motion, iType = MfgSeqMotionLatheFollow
- for PPWord tool motion, iType = MfgSeqMotionPPWord
- The available type for prismatic sequential operation are :
- for Goto Point tool motion, iType = MfgSeqMotionPoint
- for Goto Position tool motion, iType = MfgSeqMotionPosition
- for Goto Delta tool motion, iType = MfgSeqMotionDelta
- iType type of the ToolMotion to be created iPosition rank in the operation list where the ToolMotion will be created
- iPosition=0 means creation at the end of the list of tool motions oToolMotion the created ManufacturingToolMotion
- The following example creates in ManufacturingOperation SeqMO
- which is a Lathe Sequential operation
- the ManufacturingToolMotion ThisToolMotion of type MfgSeqMotionLatheGoStd at the first rank
- for GoStandard and GoGo tool motion iType = MfgSeqMotionLatheGoStd
- Example: Set SeqMO = Program1.AppendOperation("MfgLatheMfgSequentialOperation",1) Set ThisToolMotion = SeqMO.InsertToolMotion("MfgSeqMotionLatheGoStd",1)
- The following example creates in ManufacturingOperation SeqMO
- which is an Axial Point to Point sequential operation
- the ManufacturingToolMotion ThisToolMotion of type MfgSeqMotionPoint at the first rank
- which is an Axial Point to Point sequential operation
- Example: Set SeqMO = Program1.AppendOperation("PointToPoint",1) Set ThisToolMotion = SeqMO.InsertToolMotion("MfgSeqMotionPoint",1)
- Parameters:
-
- iSetup
- The Manufacturing Setup gives the accessibility checking context : the part,the machine and the relative orientation of the part on the machine.
- Example:
- The following example checks the accessibility of firstOperation on firstSetup.
Dim isAccessible As Boolean isAccessible = firstOperation.IsGeometricallyAccessibleOnSetup(firstSetup)
- Parameters:
-
- iGeometryType
- Legal values: iGeometryType can be:
- "StartElement", to remove the Start element on Profile Contouring
- "EndElement", to remove the End element on Profile Contouring
- Example:
- The following example removes the End relimiting element of the
Profile Contouring operation Contouring1
Call Contouring1.RemoveRelimitingGeometry("EndElement")
- Example:
- The following example removes the start point of the Pocketing operation Pocketing1
Call Pocketing1.RemoveStartPointGeometry
- Example:
- The following example associates in firstOperation the machinable feature
Feature
call firstOperation.SetFeature(Feature)
- Parameters:
-
- iType
- Determines if the method works on Feed Rate or Spindle Speed Legal values: iType can be
- "FEEDRATE"
- "SPINDLESPEED"
- iAutoUpdate
- Auto update status
Legal values: iType can be
- True
- False
- Example:
- The following example enables AutoUpdate for Spindle Speed
- firstOperation.SetFeedSpeedAutoUpdate("SPINDLESPEED", True)
- Parameters:
-
- iGeometryType
- Type of geometry to assign List of valid iGeometryType: - Parts - Drives - RoughStock - PartBottom - Checks - GuidingCurves - FirstGuideLine - SecondGuideLine - AuxGuidingCurves - RelimitingFace - RelimitingPlane - FirstRelimitingElement - SecondRelimitingElement - EndingPoint - StartingPoint - Island - SetupStocks - SetupDesigns dd>
- iReference
- Geometry to assign: it may be a feature (point, hole, ...) or a BREP feature. dd>
- iProduct
- Product containing the geometry to assign. It must be the occurence of the product which owns the part containing the geometry. Also see method GetProductInstance of CATIAManufacturingSetup interface. dd>
- iPosition
- Position of the geometry in the list (0 to append at the end of the list).
- Example:
- The following example assigns the plane Plane.1 as bottom of
operation Pocketing1 of the Manufacturing Program Program1.
The Product Product1 is associated to Manufacturing Setup Setup1.
This example is valid only if the Product owning the part which contains the plane has been associated to the Manufacturing Setup
(if the CATPart containing the plane has been associated to the Manufacturing Setup). In other cases, the product must be retrieved differently.
Set Product1 = Setup1.GetProductInstance() Dim Pocketing1 As ManufacturingOperation Set Pocketing1 = Program1.AppendOperation ("Pocketing",1) Pocketing1 .SetGeometry("PartBottom",Plane1,Product1,0)dd>
- Example:
- The following example associates in firstOperation the machining pattern
Pattern
call firstOperation.SetPattern(Pattern)
- Parameters:
-
- iMacroType
- Legal values: iMacroType can be:
- "Approach", to set the radius on the Approach Macro
- "Retract", to set the radius on the Retract Macro
- "ReturnInALevelApproach", to set the radius on the Return in a level Macro (Approach)
- "ReturnInALevelRetract", to set the radius on the Return in a level Macro (Retract)
- "ReturnBetweenLevelsApproach", to set the radius on the Return between levels Macro (Approach)
- "ReturnBetweenLevelsRetract", to set the radius on the Return between levels Macro (Approach)
- iRadius
- Radius value. (expressed in millimeters)
- Example:
- The following example sets a radius 5mm on the circular motion
of the retract macro on the Circular Milling operation CircularMilling1
Dim CircularMilling1 As ManufacturingOperation Set CircularMilling1 = Program1.AppendOperation ("CircularMilling1",1) Call CircularMilling1.SetRadiusOnMacro("Retract",5.00)
Sets a geometry on relimiting element in profile contouring operation.
- Parameters:
-
- iGeometryType
- Legal values: iGeometryType can be:
- "StartElement", to set the Start element on Profile Contouring
- "EndElement", to set the End element on Profile Contouring
- iReference
- Geometries to be set. It can be a list of curves or a single point. The curves must be adjacent. dd>
- iProduct
- Product containing the geometry to be set. dd>
- iOffset
- Offset to set on the relimiting geometry. (expressed in millimeters) dd>
- iPosition
- Tool position to set on the relimiting geometry.
Legal values: iPosition can be:- "IN", to set the tool position IN
- "ON", to set the tool position ON
- "OUT", to set the tool position OUT
- Example:
- The following example sets the Start relimiting element Curve1
on the Profile Contouring operation Contouring1
Call Contouring1.SetRelimitingGeometry("StartElement",Curve1,PartMachined,3.00,"ON")
- Parameters:
-
- iGeometryPosition
- Legal values: iGeometryPosition can be:
- "Outside", to set the Start point outside the pocket contour
- "Inside", to set the Start point inside the pocket contour
- iReference
- Geometry to be set. It can be a point. dd>
- iProduct
- Product containing the geometry to be set. dd>
- iOffset
- Offset set on the start point. (expressed in millimeters)
Offset is taken into account only if iGeometryPosition is set to "Outside".
- Example:
- The following example sets Point1 as Start point on the Pocketing operation Pocketing1
Call Pocketing1.SetStartPointGeometry("Inside",Point1,PartMachined,0.00)
If the tool is not already created, or if it is not authorized for this kind of Manufacturing Operation, a default tool is created.
- Example:
- The following example assign a drill tool named D-9.7 on the
operation MO1 of the Manufacturing Program Program1
A tool change with tool D-9.7 has already been created in the
Manufacturing Program.
Dim Operation1 As ManufacturingOperation Set Operation1 = Program1.AppendOperation ("Drilling",1) Operation1.SetTool("D-9.7")