Introduction
This document intended to provide a detailed guide and examples on how to write EKL script to copy variant effectivity from Eng. Item to Mfg. Item.
Along with this there are example EKL actions to copy Model Dictionary from one Mfg. Item to another Mfg. Item.
Version – 2026xGA (For older version of 3DEXPERIENCE platform check older version of this article)
Pre-requisites
Licenses –These EKL scripts call 3DSpace web services, which require specific licenses to execute as mentioned in below table. (These are referred from developer assistance of web services)
Engineering Item related web services
• XEN (Product Release Engineer) For dseng:EnterpriseReference(Authoring) Web Services
• XEN (Product Release Engineer) or PAU (3D Product Architect), For dseng:EngItem (Authoring) and dseng:EngInstance (Authoring) Web Services
• CSV (Industry Innovation), For Reading Web Services
Mfg Item related web services
• MFN (DELMIA Manufactured Items Management)
• CSV (Industry Innovation) For Reading Web Services
Mfg Process / System related web services
• MGA (DELMIA Process Management)
• CSV (Industry Innovation) For Reading Web Services
Resource related web services
• MGA (DELMIA Process Management)
• FAM (DELMIA Factory Asset Management)
• CSV (Industry Innovation) For Reading Web Services
Model dictionary or portfolio related web services
• PDM (Product Manager), For Authoring Web Services
• CSV (Collaborative Industry Innovator), For Reading Web Services
Model configuration, effectivity or IP Configuration related web services
• CFG (Configuration Management), For all dscfg web services
• CSV (Industry Innovation), For Reading Web Services
Disclaimer: Licenses mentioned above are as per 2026x documentation.
Logical Flow
The sequence of the scripts/ steps for this unset effectivity EKL script is the following.
Example
Disclaimer: This code is just an example and should only be used by people who know the Enterprise Knowledge Language (EKL) and the DELMIA data model very well. The intent is not to provide a ready to deploy product code. So we are not responsible for any issues you may face with this code.While deploying the above EKl scripts, create the EKL action in order as given below
Detail Explanation
How to call EKL action
In this EKL script, we are calling two EKL actions.
By calling first EKL action will get variant effectivity expression on Eng. item.
Second EKL action will set the retrieved effectivity expression on selected Mfg. item.
Steps followed for calling EKL action are,
- Create AdvisorAction for EKL action to Get Variant Effectivity On Eng. Item
- Call Run function on above AdvisorAction.
For example – Below script calls EKL action.
// Retrieve Action to get variant effectivity from Eng Item
Let strEngItemEffExprsn(String)
Let actionGetEngItemEffect (AdvisorAction)
actionGetEngItemEffect = AccessResource("GetEffectivity_EngItem","AdvisorAction")
// Assign Get Variant effectivity on Eng Item EKL action as shown below
//actionGetEngItemEffect = `Knowledge Engineering Specification Physical00000084 A.1\\Relations\\Get Variant Effectivity On Eng Item V1.0`
if actionGetEngItemEffect <> NULL
{
actionGetEngItemEffect.Run(selFromEngItemOcc, strEngItemEffExprsn)
}Note – Along with this post Get variant effectivity from Eng. Item and Set variant effectivity on Mfg. item EKL action is attached, which can be used and referred in copy variant effectivity EKL action.
Here under some Use Case about possible adaptation of the script
1. Requirement 1: Copy variant effectivity of other type of objects in structure
In above example we saw detailed explanation of how the script is written to copy the effectivity of Eng. Item to Mfg. Item, there might be requirement where we need to copy effectivity from Mfg. Item to system, Mfg. item to another Mfg. Item, Mfg. Item to Resource Item, etc…
Below are some of the changes required in the script to use it for Eng. Item, System or Resources.
- Object selection
Based on to which type of object we want to copy effectivity we will set its type.
| Mfg Item | Eng Item | System | Resource |
|---|---|---|---|
| MfgProcessOccurrence | ProductOccurrence | ProdSystemOccurrence | ResourceOccurrence |
- Create and Call respective EKL actions to get and set variant Effectivity
In our example, we get effectivity from Eng. Item and set on Mfg. Item. Similar way create EKL script as per need,
Step 1: Write EKL action to get effectivity from Eng. Item, Mfg. Item, etc...
Step 2: Write EKL action to set effectivity on Mfg. Item, System, Resource, etc…
For example – if we want to copy effectivity from one Mfg. item to another Mfg. item then,
FOR EXAMPLE -
// Assign Get Variant effectivity on Mfg Item EKL action as shown below
//actionGetEngItemEffect = `Knowledge Engineering Specification Physical00000084 A.1\\Relations\\Get Variant Effectivity On Mfg Item V1.0`
// Assign Set Variant effectivity on Mfg Item EKL action as shown below
//actionSetMfgItemEffect = `Knowledge Engineering Specification Physical00000084 A.1\\Relations\\Set Variant Effectivity On Mfg Item V1.0`2. Requirement 2: Copy Evolution effectivity on Mfg. Item or any other type of object
Above example shows how to copy variant effectivity from Eng. item to Mfg. Item, similarly if user want to copy Evolution effectivity then below are some changes required in above EKL script.
- Step 1 : Create respective EKL actions to get and set Evolution Effectivity
Refer documentation related to get and set variant effectivity present in this wiki tree. There are scenarios mentioned which will assist to write EKL action to get and set evolution effectivity.
- Step 2 : Create new EKL action to copy evolution effectivity as per user from and to requirement.
How to Deploy
Follow below steps to deploy the above EKL script
- Download all the provided EKL Scripts
- Create one new "Physical Product" to act as a container for the EKL actions and give it some suitable name. For ex. "Copy_Varient_Effectivity_EKL_Scripts"
- Create "Knowledge Actions" for each EKL script in the newly created Physicals Product and give them some suitable name. Follow the sample video available on this page to know "How to create Knowledge Action". (While creating the EKL actions, create the EKL actions as per the same sequence as they are available in the "Example" section)
- For each script, set the input and output arguments as explained at the top of the script in the "Input output argument" comment section.
- In the "Copy_Variant_Effectivity_From_Eng_Item_To_Mfg_Item_Updated" and "Copy_Variant_Effectivity_From_Mfg_Item_To_Mfg_Item_Updated" update the outdated/old references of the other EKL actions. (To update the reference: 1. Remove the old reference of the EKL action available in front of the "Advisor Action" variable 2. Keep the cursor infront of the "=" sign 3. Double click on the respective EKL action in the tree. The reference will automatically get updated.)
- Save the scripts
- Execute the desired EKL script
Author
Author - @RR
Person of Contact - @KA
