MfgActivityPackage Methods

This section describes the methods of the MfgActivityPackage.

This page discusses:

MachiningProcess.GetInstantiatedActivities()

Returns the instantiated operations and the list of compatible tools for each operation.

Signature

MachiningProcess.GetInstantiatedActivities(List of instantiated Activities : List, List of compatible tools : List) : Boolean

Arguments

Name Input/Output Required? Type Comment
List of instantiated Activities Out Yes List -
List of compatible tools Out Yes List -

ReturnType

Boolean

Example

/* Let NCMTemplate be the input argument of type NCMachiningTemplate*/
Let MOperation(ManufacturingOperation)
Let MMachiningProcess(MachiningProcess)

[...]
Set MMachiningProcess = NCMTemplate.CreateMachiningProcess
Set MOperation =MMachiningProcess.InsertActivity("Drilling", NULL)
MMachiningProcess.Instantiate(program, NULL, NULL)
MMachiningProcess.GetInstantiatedActivities(listInstantiatedActivities, listToolsList)

MachiningProcess.Instantiate()

Instantiates the machining process.

Signature

MachiningProcess.Instantiate(Machining Activity Insertion Level : ManufacturingActivity, Feature : ManufacturingFeature, Product : ProductOccurrence) : Boolean

Arguments

Name Input/Output Required? Type Comment
Machining Activity Insertion Level In Yes ManufacturingActivity -
Feature In Yes ManufacturingFeature Feature on which the machining process is instantiated.
Product In Yes ProductOccurrence Product associated with the feature.

ReturnType

Boolean

Example

/* Let NCMTemplate be the input argument of type NCMachiningTemplate*/
Let MOperation(ManufacturingOperation)
Let MMachiningProcess(MachiningProcess)

[...]
Set MMachiningProcess = NCMTemplate.CreateMachiningProcess()
Set MOperation =MMachiningProcess.InsertActivity("Drilling", NULL)
MMachiningProcess.Instantiate(program, NULL, NULL)

ManufacturingActivity.AddGeometry()

Adds a geometry.

Signature

ManufacturingActivity.AddGeometry(Type : String, Reference of geometry to add : Visualizable, Product belongs the geometry : ProductOccurrence, Verify : Integer, Position : Integer) : Boolean

Arguments

Name Input/Output Required? Type Comment
Type In Yes String -
Reference of geometry to add In Yes Visualizable -
Product belongs the geometry In Yes ProductOccurrence -
Verify In Yes Integer Checks if the added geometry is already in the geometry list. Default value is 0:
  • 0: adds the geometry without checking the geometry list.
  • 1: adds the geometry only if the geometry is not in the geometry list.
Position In Yes Integer Position of the geometry in the geometry list.

ReturnType

Boolean

Example

/* Let Plane be the input argument of type CATFace and PlaneProduct be the argument of type ProductOccurrence*/ 
Let MFeature(ManufacturingFeature)

[...]
Set MFeature = CreateMachiningFeature("MfgPrismaticSlab")
MFeature.AddGeometry("PartBottom", Plane, PlaneProduct, 0, 0)

ManufacturingActivity.GetCurrentAngle()

Returns the angle between the tool axes of the current and reference operations.

Note: The reference operation is chosen by default.

Signature

ManufacturingActivity.GetCurrentAngle() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let CurrAngle(Real)
[...]

set CurrAngle = MfgActivity.GetCurrentAngle()

ManufacturingActivity.GetCurrentDistance()

Returns the distance between the tool path start point of the current operation and the tool path end point of the reference operation.

Notes:
  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetCurrentDistance() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let CurrDist(Real)
[...]

set CurrDist = MfgActivity.GetCurrentDistance()

ManufacturingActivity.GetCurrentLatitudeAngle()

Returns the difference between the latitude angles of the tool axis of the current and reference operations.

Notes:
  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetCurrentLatitudeAngle() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let CurrLatAngle(Real)
[...]

set CurrLatAngle = MfgActivity.GetCurrentLatitudeAngle()

ManufacturingActivity.GetCurrentLongitudeAngle()

Returns the difference between the longitude angles of the tool axis of the current and reference operations.

  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetCurrentLongitudeAngle() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let CurrLongAngle(Real)
[...]

set CurrLongAngle = MfgActivity.GetCurrentLongitudeAngle()

ManufacturingActivity.GetCurrentZTopValue()

Returns the difference between the z-coordinate of the tool path start point of the current operation and the tool path start point of the reference operation.

  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetCurrentZTopValue() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let CurrZTopValue(Real)
[...]

set CurrZTopValue = MfgActivity.GetCurrentZTopValue()

ManufacturingActivity.GetDistance()

Returns the distance between the tool path end point of the operation and the tool path start point of another operation.

Notes:
  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetDistance(Activity2 : ManufacturingActivity) : Real

Arguments

Name Input/Output Required? Type Comment
Activity2 In Yes ManufacturingActivity -

ReturnType

Real

Example

Let MfgActivity1(ManufacturingActivity)
Let MfgActivity2(ManufacturingActivity)
Let Dist(Real)
[...]

set Dist = MfgActivity1.GetDistance(MfgActivity2)

ManufacturingActivity.GetFeature()

Returns the manufacturing or design feature associated with the manufacturing operation.

Signature

ManufacturingActivity.GetFeature() : Feature

ReturnType

Feature

Example

Let MOperation(ManufacturingOperation)	
Let MFeature(ManufacturingFeature)  

[...] 	
Set MFeature = MOperation.GetFeature()

ManufacturingActivity.GetFeatureInContext()

Returns the manufacturing feature associated with the manufacturing operation.

Signature

ManufacturingActivity.GetFeatureInContext() : Feature

ReturnType

Feature

Example

Let MOperation(ManufacturingOperation)
Let MFeature(ManufacturingFeature)

[...]
Set MFeature = MOperation.GetFeatureInContext()

ManufacturingActivity.GetGeometricElements()

Returns the list of geometric elements.

Signature

ManufacturingActivity.GetGeometricElements(Type : String, List of geometries : List, All geometries (hidden and showed) : Boolean, Duplicated : Boolean) : Boolean

Arguments

Name Input/Output Required? Type Comment
Type In Yes String -
List of geometries Out Yes List -
All geometries (hidden and showed) In Yes Boolean Specifies if all the geometric elements must be retrieved. The default value is False:
  • False: only geometric elements on the visible space are retrieved.
  • True: all geometric elements are retrieved.
Duplicated In Yes Boolean Specifies if the geometric elements must be duplicated. The default value is False:
  • False: geometric elements are duplicated only if necessary in a product context.
  • True: geometric elements are duplicated.

ReturnType

Boolean

Example

/* Let Plane be the input argument of type CATFace and PlaneProduct be the argument of type ProductOccurrence*/
Let MFeature(ManufacturingFeature)	\nLet listGeometries(List)

[...]
Set MFeature = CreateMachiningFeature("MfgPrismaticSlab")
MFeature.AddGeometry("Drives", Plane, PlaneProduct, 0, 0)
MFeature.GetGeometricElements("Drives", listGeometries, false, false)

ManufacturingActivity.GetLatitudeAngle()

Returns the latitude angle in a spherical coordinate system of the operation tool axis.

Notes:
  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetLatitudeAngle() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let LatitudeAngle(Real)
[...]

set LatitudeAngle = MfgActivity.GetLatitudeAngle()

ManufacturingActivity.GetLongitudeAngle()

Returns the longitude angle in a spherical coordinate system of the operation tool axis.

Notes:
  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.
  • The reference operation is chosen by default.

Signature

ManufacturingActivity.GetLongitudeAngle() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let LongitudeAngle(Real)
[...]

set LongitudeAngle = MfgActivity.GetLongitudeAngle()

ManufacturingActivity.GetMachiningDirection()

Returns the machining direction.

Signature

ManufacturingActivity.GetMachiningDirection(Tool Axis Direction : MfgDirection) : MfgDirection

Arguments

Name Input/Output Required? Type Comment
Tool Axis Direction Out Yes MfgDirection -

ReturnType

MfgDirection

Example

Let MOperation(ManufacturingOperation)
Let MDirection(MfgDirection)

[...]
MOperation.GetMachiningDirection(MDirection)

ManufacturingActivity.GetPatternUsage()

Signature

ManufacturingActivity.GetPatternUsage(Pattern : MfgPatternUsage) : Boolean

Arguments

Name Input/Output Required? Type Comment
Pattern Out Yes MfgPatternUsage -

ReturnType

Boolean

ManufacturingActivity.GetProgram()

Returns the manufacturing program containing the operation.

Signature

ManufacturingActivity.GetProgram() : ManufacturingProgram

Example

Let MfgActivity(ManufacturingActivity)
Let Program(ManufacturingProgram)
[...]

set Program = MfgActivity.GetProgram()

ManufacturingActivity.GetToolAxisDirection()

Returns the tool axis direction.

Signature

ManufacturingActivity.GetToolAxisDirection(Tool Axis Direction : MfgDirection) : MfgDirection

Arguments

Name Input/Output Required? Type Comment
Tool Axis Direction Out Yes MfgDirection -

ReturnType

MfgDirection

Example

Let MOperation(ManufacturingOperation)
Let MDirection(MfgDirection)

[...]
MOperation.GetMachiningDirection(MDirection)

ManufacturingActivity.GetType()

Returns the type of the manufacturing operation.

Signature

ManufacturingActivity.GetType(type : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
type Out Yes String Type of the manufacturing operation.

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)
Let OperationType(String)

[...]
MOperation.GetType(OperationType)

ManufacturingActivity.GetZTopValue()

Returns the distance between the tool path start point and the table rotation center, along the tool axis direction of the operation.

Notes:
  • This function applies to operations with a tool path only.
  • You must compute the tool path before calling this function.

Signature

ManufacturingActivity.GetZTopValue() : Real

ReturnType

Real

Example

Let MfgActivity(ManufacturingActivity)
Let ZTopValue(Real)
[...]

set ZTopValue = MfgActivity.GetZTopValue()

ManufacturingActivity.HasPrecedenceWithCurrentMO()

Returns true if the operation has a precedence with the last sequenced operation.

Signature

ManufacturingActivity.HasPrecedenceWithCurrentMO() : Boolean

ReturnType

Boolean

Example

Let MfgActivity(ManufacturingActivity)
Let HasPrecedence(Boolean)
[...]

set HasPrecedence = MfgActivity.HasPrecedenceWithCurrentMO()

ManufacturingActivity.InsertActivity()

Creates an operation under a reference.

Signature

ManufacturingActivity.InsertActivity(Operation Type : String, Referenced Operation : ManufacturingOperation) : ManufacturingOperation

Arguments

Name Input/Output Required? Type Comment
Operation Type In Yes String -
Referenced Operation In Yes ManufacturingOperation Reference under which the operation will be created.

Example

/* Let NCMTemplate be the input argument of type NCMachiningTemplate*/ 
Let MOperation(ManufacturingOperation)
Let MMachiningProcess(MachiningProcess)

[...]
Set MMachiningProcess = NCMTemplate.CreateMachiningProcess()
Set MOperation =MMachiningProcess.InsertActivity("Drilling", NULL)

ManufacturingActivity.IsBefore()

Returns true if the current operation is sequenced before the input operation.

Signature

ManufacturingActivity.IsBefore(Activity2 : ManufacturingActivity) : Boolean

Arguments

Name Input/Output Required? Type Comment
Activity2 In Yes ManufacturingActivity -

ReturnType

Boolean

Example

Let MfgActivity1(ManufacturingActivity)
Let MfgActivity2(ManufacturingActivity)
Let IsBef(Boolean)
[...]

set IsBef = MfgActivity1.IsBefore(MfgActivity2)

ManufacturingActivity.IsSequenced()

Returns true is the operation can still be sequenced.

Signature

ManufacturingActivity.IsSequenced() : Boolean

ReturnType

Boolean

Example

Let MfgActivity(ManufacturingActivity)
Let IsSeq(Boolean)
[...]

set IsSeq = MfgActivity.IsSequenced()

ManufacturingActivity.IsSequencedWith()

Returns true if the current operation is sequenced with the input operation.

Signature

ManufacturingActivity.IsSequencedWith(Activity2 : ManufacturingActivity) : Boolean

Arguments

Name Input/Output Required? Type Comment
Activity2 In Yes ManufacturingActivity -

ReturnType

Boolean

Example

Let MfgActivity1(ManufacturingActivity)
Let MfgActivity2(ManufacturingActivity)
Let IsSeqWith(Boolean)
[...]

set IsSeqWith = MfgActivity1.IsSequencedWith(MfgActivity2)

ManufacturingActivity.NotNextInSequence()

When auto-sequencing operations, defines that Operation1 (MO1) should not be sequenced before Operation2(MO2). Use this method to define a local rule (rule for which a context or reference is needed to determine the sequence between operations) for auto-sequence.

Signature

ManufacturingActivity.NotNextInSequence(Activity2 : ManufacturingActivity) : Boolean

Arguments

Name Input/Output Required? Type Comment
Activity2 In Yes ManufacturingActivity Operation2

ReturnType

Boolean

Example


if ( ( MO1 <> MO2 ) And 
     ( MO1->IsSequenced() == false) And 
     ( MO2->IsSequenced() == false) And 
     ( MO1->IsBefore(MO2) == false ) And 
     (<Custom check for comparison between MO1 and MO2 for example: MO1->GetCurrentDistance() > MO2->GetCurrentDistance()>) ) 
   {
     MO1->NotNextInSequence(MO2) ) 
   }

ManufacturingActivity.RemoveFeature()

Removes a feature from a manufacturing operation.

Signature

ManufacturingActivity.RemoveFeature(feature : Feature) : Boolean

Arguments

Name Input/Output Required? Type Comment
feature In Yes Feature Feature to be removed.

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)
Let MFeature(ManufacturingFeature)

[...]
Set MFeature = CreateMachiningFeature("MfgPrismaticSlab")
MOperation.SetFeature(MFeature,NULL) 


MOperation.RemoveFeature(MFeature)

ManufacturingActivity.RemoveGeometries()

Signature

ManufacturingActivity.RemoveGeometries(Type : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
Type In Yes String -

ReturnType

Boolean

ManufacturingActivity.SetFeature()

Assigns a feature to a manufacturing operation.

Signature

ManufacturingActivity.SetFeature(feature : Feature, context : ProductOccurrence) : Boolean

Arguments

Name Input/Output Required? Type Comment
feature In Yes Feature Feature to be assigned. Can be a design or manufacturing feature such as a pattern or machinable feature.
context In Yes ProductOccurrence Product that contains the feature itself (design feature) or the geometry pointed by the manufacturing feature.

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)
Let MFeature(ManufacturingFeature)

[...]
Set MFeature = CreateMachiningFeature("MfgPrismaticSlab")
MOperation.SetFeature(MFeature,NULL)

ManufacturingActivity.SetFinishingFSConfig()

Sets the finishing FS configuration based on key identifiers.

Signature

ManufacturingActivity.SetFinishingFSConfig(Key1 : String, Key2 : String, Key3 : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
Key1 In Yes String First identifier
Key2 In Yes String Second identifier
Key3 In Yes String Third identifier

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)

[...]
MOperation.SetFinishingFSConfig("KeyOne", "KeyTwo", "KeyThree")

ManufacturingActivity.SetMachiningFSConfig()

Sets the machining FS configuration based on key identifiers.

Signature

ManufacturingActivity.SetMachiningFSConfig(Key1 : String, Key2 : String, Key3 : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
Key1 In Yes String First identifier
Key2 In Yes String Second identifier
Key3 In Yes String Third identifier

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)

[...]
MOperation.SetMachiningFSConfig("KeyOne", "KeyTwo", "KeyThree")

ManufacturingActivity.SetPatternUsage()

Sets the pattern usage to the manufacturing operation.

Signature

ManufacturingActivity.SetPatternUsage(Pattern : MfgPatternUsage) : Boolean

Arguments

Name Input/Output Required? Type Comment
Pattern In Yes MfgPatternUsage Pattern usage to be added.

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)
Let MFeature(MfgPatternUsage)

[...]
Set MOperation = MP.AppendOperation("Drilling", False )
CreatePatternUsage(MFeature)
MOperation.SetPatternUsage( MFeature )

ManufacturingOperation.GetComment()

Returns any comment on a manufacturing operation.

Signature

ManufacturingOperation.GetComment() : String

ReturnType

String

Example

Let MOperation(ManufacturingOperation)
Let Comment(String)

[...]
Set Comment = MOperation.GetComment()

ManufacturingOperation.GetMacroMotion()

Retrieves macro motions based on the macro name.

Signature

ManufacturingOperation.GetMacroMotion(Macro Name : String, Macro Motions : MfgMacroMotions) : MfgMacroMotions

Arguments

Name Input/Output Required? Type Comment
Macro Name In Yes String -
Macro Motions Out Yes MfgMacroMotions -

ReturnType

MfgMacroMotions

Example

Let MacroMotions(MfgMacroMotions)
Let MOperation(ManufacturingOperation)
Let MFeature(M3xTo5xConverter)

[...]
MOperation.GetMacroMotion("MfgApproachMacro", MacroMotions)
MFeature.GetMacroMotion("MfgApproachMacro", MacroMotions)

ManufacturingOperation.GetTool()

Returns the tool associated with the manufacturing operation.

Signature

ManufacturingOperation.GetTool() : ToolDevice

ReturnType

ToolDevice

Example

Let MOperation(ManufacturingOperation)
Let Tool(ToolDevice)

[...]
Set Tool = MOperation.GetTool()

ManufacturingOperation.GetToolAndAssembly()

Returns the tool and tool assembly associated with the manufacturing operation.

Signature

ManufacturingOperation.GetToolAndAssembly(tool : ToolDevice, toolassembly : ToolDevice) : Boolean

Arguments

Name Input/Output Required? Type Comment
tool Out Yes ToolDevice -
toolassembly Out Yes ToolDevice -

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)
Let Tool(ToolDevice)
Let ToolAssembly(ToolDevice)

[...]
Set Tool = MOperation.GetToolAndAssembly(Tool,ToolAssembly)

ManufacturingOperation.GetToolDiameter()

Returns the nominal diameter of the mill tool used in the operation.

Signature

ManufacturingOperation.GetToolDiameter() : Real

ReturnType

Real

Example

Let MfgOperation(ManufacturingOperation)
Let ToolDia(Real)

[...]

set ToolDia = MfgOperation.GetToolDiamter()

ManufacturingOperation.GetToolLengthCut()

Returns the cutting length of the mill tool used in the operation.

Signature

ManufacturingOperation.GetToolLengthCut() : Real

ReturnType

Real

Example

Let MfgOperation(ManufacturingOperation)
Let ToolCutLength(Real)

[...]

set ToolCutLength = MfgOperation.GetToolLengthCut()

ManufacturingOperation.GetToolName()

Returns the name of the tool or tool assembly used in the operation.

Signature

ManufacturingOperation.GetToolName() : String

ReturnType

String

Example

Let MfgOperation(ManufacturingOperation)
Let ToolName(String)

[...]

set ToolName = MfgOperation.GetToolName()

ManufacturingOperation.GetToolNumber()

Returns the tool number of the tool or tool assembly used in the operation.

Signature

ManufacturingOperation.GetToolNumber() : Integer

ReturnType

Integer

Example

Let MfgOperation(ManufacturingOperation)
Let ToolNumber(Integer)

[...]

set ToolNumber = MfgOperation.GetToolNumber()

ManufacturingOperation.GetToolType()

Returns the type of the tool or tool assembly used in the operation.

Signature

ManufacturingOperation.GetToolType() : String

ReturnType

String

Example

Let MfgOperation(ManufacturingOperation)
Let ToolType(String)

[...]

set ToolType = MfgOperation.GetToolType()

ManufacturingOperation.SetComment()

Sets a comment on a manufacturing operation.

Signature

ManufacturingOperation.SetComment(comment : String) : Boolean

Arguments

Name Input/Output Required? Type Comment
comment In Yes String Comment to define

ReturnType

Boolean

Example

Let MOperation(ManufacturingOperation)

[...]
MOperation.SetComment("My Comment")

ManufacturingOperation.SetTool()

Associates the tool with the manufacturing operation.

Signature

ManufacturingOperation.SetTool(tool : VPMInstance, checkToolChange : Boolean) : Boolean

Arguments

Name Input/Output Required? Type Comment
tool In Yes VPMInstance Instance of the tool to be associated.
checkToolChange In Yes Boolean Indicates if the tool changes need to be checked.

ReturnType

Boolean

Example

/* Let program be the input argument of the Type ManufacturingProgram and Tool be the argument of Type ToolDeviceInstance*/
Let MOperation(ManufacturingOperation)

Set MOperation = program.AppendOperation("Facing", false)
MOperation.SetTool(Tool,true)

ManufacturingOperation.SetToolRequirement()

Associates the tool requirement with the manufacturing operation.

Signature

ManufacturingOperation.SetToolRequirement(Tool Device : ToolDevice) : Boolean

Arguments

Name Input/Output Required? Type Comment
Tool Device In Yes ToolDevice Tool requirement to associate. If NULL_var (default value), a default tool requirement is associated.

ReturnType

Boolean

Example

/* Let Tool be the input argument of Type ToolDevice*/
Let MOperation(ManufacturingOperation)

[...]
MOperation.SetToolRequirement(Tool)

ManufacturingProgram.AppendOperation()

Inserts a new manufacturing operation at the beginning of the program.

Signature

ManufacturingProgram.AppendOperation(type : String, autoSequence : Boolean) : ManufacturingOperation

Arguments

Name Input/Output Required? Type Comment
type In Yes String Type of manufacturing operation to create.
autoSequence In Yes Boolean Determines if the created operation is sequence in the program or not:
  • TRUE: the operation is sequenced in the program.
  • FALSE: the operation is not sequenced in the program.

Example

/* Let program be the input argument of the Type ManufacturingProgram*/  
Let MOperation(ManufacturingOperation)  

Set MOperation = program.AppendOperation("Facing", false)

Recommendations

  • Do not modify the name of the default rules.
  • New rules should have different names from the default rules.