PLMProcessAdvTypePackage Types

This section describes the types of the PLMProcessAdvTypePackage.

Note: The "manufactured item" objects described in this document were known as "process" objects in previous releases. The term process is still used in the names of functions, types, methods, attributes, and so on. In this case, process now means manufactured item.

This page discusses:

Object Function: new

The new function is used to create objects based upon the object's type name.

The following manufactured item objects can be created:

  • CreateMaterial
  • CreateKit
  • CreateAssembly
  • ElementaryEndItem
  • Fasten
  • Marking
  • Provide
  • Remove
  • Split
  • Transform
  • ProcessContinuousProvide
  • ProcessContinuousCreateMaterial.

For more information, see Object Functions: new.

new
Returns the created manufactured item object that can be a standalone reference, a reference that is aggregated under another reference by automatic creation of an instance, or an instance directly under a reference.
  • Input:
    • Arg 1: name of the PLM type as string.
    • Arg 2: name of the PLM entity once created as string. It can be null.
    • Arg 3: parent PLM entity that aggregates this created object as ObjectType. It can be null.
    • A one-string free argument:
      • Magnitude_Mass
      • Magnitude_Lenght
      • Magniture_Area
      • Magnitude_Volume.
      Note: A free argument is mandatory for Continuous types.
  • Output: created object, which can be null if the creation has failed.

Example

Let Instance (DELFmiFunctionInstance) 
Let Reference (DELFmiFunctionReference)

/* Creation of Process Reference */
Reference = new ("CreateAssembly", "MyCreateAssembly1", NULL)

/* Insertion of  newly created reference */ 
/* under a father as MfgProcessOccurrence */
FatherProcessOcc.InsertPredecessor (Reference)
 
/* Creation of a Process Reference and instantiation */
/* under a father process reference as a DELFmiFunctionReference */
Instance = new ("CreateAssembly", "MyCreateAssembly2", FatherRef)

MfgProcessOccurrence

Represents the occurrence of a manufactured item in Manufacturing Planning applications.

Inheritance Path

ObjectType
 Feature
  MfgProcessOccurrence

Attributes

Name Type Comment
AssignedProduct List Returns the products (list of ProductOccurrence) assigned to this manufactured item occurrence.
CapableResources List Returns the capable resources (list of VPMReference) for this manufactured item occurrence.
Instance DELFmiFunctionInstance Returns the manufactured item instance related to this manufactured item occurrence.
ProcessGroup List This computed attribute returns a list of GroupOfProcessInstance.
ProcessOutput PLMCoreReference Returns the manufactured item output reference associated with this manufactured item occurrence.
ProductScope PLMCoreReference Returns the product reference scope linked to this manufactured item occurrence.
Reference DELFmiFunctionReference Returns the manufactured item reference related to this manufactured item occurrence.

GroupOfProcessInstance

Represents the instance of a Group.

Attributes

Name Type Comment
ProcessGroupOwner DELFmiFunctionReference Returns the manufactured item reference under which the Group is aggregated.

For other entities related to GroupOfProcessInstance, see DELPLMFProcessAdvFunctionPackage Functions.

Example of Use: Managing Groups of Manufactured Items

The following EKL script shows how the MfgProcessOccurrence type and associated methods can be used for managing Groups.

Let MyPrcsGroup1 (GroupOfProcessInstance)
Let MyPrcsGroup2 (GroupOfProcessInstance)
Let MyPrcsSubGroup1 (GroupOfProcessInstance)
Let Groups (List)
Let NbGroup (Integer)
Let Status ( Boolean)
Let Diagnostic ( GroupProcessDiagnostic )
Let ProcessRefRead (DELFmiFunctionReference)
Let ProcessRef (DELFmiFunctionReference)
Let ChildrenPrcsOcc (List)
Let ProcessesOrGroups (List)
Let PrcsOcc (MfgProcessOccurrence)
Let FatherRead ( Feature )
Let ProcessOrGroup ( Feature )
Let NbPrcsOrGprs (Integer)

/* SelPrcsOcc is a MfgProcessOccurrence given by a user selection */

/* Get the reference */
Set ProcessRef = SelPrcsOcc.Reference
 
/* Group Creation */
MyPrcsGroup1 = SelPrcsOcc.CreateProcessGroup() 
if (MyPrcsGroup1 == NULL)
   Message ("Process Group 1 Creation Failed ")

/* Check whether the group is empty */
Status = MyPrcsGroup1.IsEmpty()
if (Status <> True) 
   Message ("IsEmpty Failed MyPrcsGroup1 expected to be empty here")

/* Check the group owner */
Set ProcessRefRead = MyPrcsGroup1.ProcessGroupOwner
if ( ProcessRefRead <> ProcessRef OR ProcessRefRead == NULL)
   Message (" ProcessGroupOwner Failed on MyPrcsGroup1")
 
/* GetChildren of Selected Process Occurrence */
Set ChildrenPrcsOcc = SelPrcsOcc.Children

/* Add children process in the group */
For PrcsOcc inside ChildrenPrcsOcc 
{
   /* Check if insertion is possible */
   set Status = MyPrcsGroup1.IsObjectInsertionAuthorized( PrcsOcc, Diagnostic )
   if (Status <> True OR Diagnostic <> "NoError")
      Message ("Insertion status not correct: expected to be OK here")

   /*Add process in the group */
   MyPrcsGroup1.AddProcessOrGroup( PrcsOcc, Diagnostic )
   if (Diagnostic <> "NoError")
      Message ("AddProcessOrGroup status not correct: expected to be OK here")
}

/* Check whether the group is empty */
set Status = MyPrcsGroup1.IsEmpty()
if (Status <> False) 
   Message ("IsEmpty Failed MyPrcsGroup1 expected to be NOT empty here")
 
/*Create a Sub Group*/
Set MyPrcsSubGroup1 = MyPrcsGroup1.CreateAndInsertGroup ( Diagnostic )
if (MyPrcsSubGroup1 == NULL OR Diagnostic <> "NoError")
   Message (" CreateAndInsertGroup failed")

/* Check whether it is a SubGroup*/
Set Status = MyPrcsSubGroup1.IsSubGroup()
if (Status <> True)
   Message (" IsSubGroup failed: Expected to be a sub group here")

/* Get all the content of the process group */
Set ProcessesOrGroups = MyPrcsGroup1.GetProcessOrGroups ( ProcessRef ) 
NbPrcsOrGprs = ProcessesOrGroups.Size()
   Message (" Number of Processes or groups in MyPrcsGroup1: ", NbPrcsOrGprs )

/* Get the 1st level content of the process group */
Set ProcessesOrGroups = MyPrcsGroup1.GetProcessOrGroupsFirstLevel ( ProcessRef )
NbPrcsOrGprs = ProcessesOrGroups.Size()
   Message (" Number of Processes or groups in MyPrcsGroup1 : ", NbPrcsOrGprs )

/* Flush the Group */
For ProcessOrGroup inside ProcessesOrGroups 
{
   /* Check if removal is possible */
   set Status = MyPrcsGroup1.IsObjectRemovalAuthorized ( PrcsOcc , Diagnostic )
   if (Status <> True OR Diagnostic <> "NoError")
      Message (" Removal Insertion status not correct: expected to be OK here")

   /* remove Process or SubGroup */
   MyPrcsGroup1.RemoveProcessOrGroup(ProcessOrGroup, Diagnostic)
   if ( Diagnostic <> "NoError")
      Message (" RemoveProcessOrGroup failed")
}

/* Create a new Group2 */
Set MyPrcsGroup2 = SelPrcsOcc.CreateProcessGroup() 
if (MyPrcsGroup2 == NULL)
   Message ("Process Group 2 Creation Failed ")

/* ProcessGroup */
set Groups = SelPrcsOcc.ProcessGroup
set NbGroup = Groups->Size()
   Message ("Nb of Groups: ", NbGroup)

/* Remove the 1st Group */
SelPrcsOcc.RemoveProcessGroup(MyPrcsGroup1)

/* Remove all the process groups */
SelPrcsOcc.RemoveAllProcessGroups()
set Groups = SelPrcsOcc.ProcessGroup
set NbGroup = Groups->Size()
   Message ("Nb of groups incorrect AFTER Remove All : ",NbGroup )