Copy Configuration Context from Eng. Item to Mfg. Item

Whats new in 2026?
The scripts now use the "GetPhysicalId" method to get the Physical ID of the objects instead of using web services. This makes the overall script simpler.

Introduction

This document intended to provide a detailed guide and examples on how to write EKL script to Copy Configuration Context & Criteria (Model Dictionary) from Eng. Item to Mfg. Item.

Along with this there are example EKL actions to copy Model dictionary & criteria from Mfg. Item to System, System to Resource.

 

Version – 2021x FD09 (FP2140), 2022x FD08 (FP2319), 2023x FD04 (FP2333) ,2026x GA

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 documentation 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 2021x, 2022x and 2023x documentation.

 

Logical Flow

The sequence of the scripts / steps to copy Model Dictionary & criteria from Eng. Item to Mfg. Item are 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.

Below are the common EKL Scripts used by above EKL scripts: Get, Attach and Copy configuration context EKL scripts for Mfg. Item, System, Engg.  Item and Resources

Example

HTTP_Request
Get_CSRF_Token

 

Below are the scripts Required to Copy Configuration Context from Engg. Item to mfg. Item

 

Get_Attached_Configuration_Context_On_Engg_Item_Resource
Attach_Configuration_Context_On_Mfg_Item
Copy_Configuration_Context_From_EnggItem_to_Mfg_Item

Below are the scripts Required to Copy Configuration Context from Mfg. Item to System

 

Get_Attached_Configuration_Context_On_Mfg_Item
Attach_Configuration_Context_On_System

 

Copy_Configuration_Context_From_Mfg_Item_to_System

Below are the scripts Required to Copy Configuration Context from System to Resource

Get_Attached_Configuration_Context_on_System 
Attach_Configuration_Context_On_Engg_Item_Resource
Copy_Configuration_Context_From_System_to_Resource

 

Detail Explanation

How to call EKL action

In this EKL script, we are calling two EKL actions.

By calling first EKL action will get Model configuration & criteria on Eng. item.

Second EKL action will set the retrieved Model dictionary & criteria on selected Mfg. item.

Steps followed for calling EKL action are,

  1. Create AdvisorAction for EKL action to Get Model Dictionary On Eng. Item
  2. Call Run function on above AdvisorAction.

For example – Below scripts calls EKL actions

If you have added the EKL Actions in Resource table, you can use following method to access the EKL Action

// Retrieve Action to get Model Dictionary from Eng Item
set actionExtractEBOMModel = AccessResource("GetDictionary_EngItem","AdvisorAction")

Also, you can directly access the EKL action from the tree by specifying its path in the tree

// Retrieve Action to get Model Dictionary from Eng Item
set actionExtractEBOMModel = `Knowledge Engineering Specification Physical00000084 A.1\\Relations\\Get Model Dictionary on Eng Item and Resource Object V1.0`

Below line of code runs the EKL action

// Run the "Get Model Dictionary on Eng Item" EKL action as shown below
actionExtractEBOMModel.Run(selProdOcc, strEBOMModelPID, strEBOMModelName)

Here under some Use Case about possible adaptation of the script

1. Requirement 1: Copy model dictionary & criteria on other type of objects in structure

In above example we saw detailed explanation of how the script is written to copy the Model dictionary & criteria from Eng. Item to Mfg. Item, there might be requirement where we need to copy Model dictionary on other objects like Eng. Item, System or Resource objects. In this case, user need to modify above script and reuse them.

Below are some of the changes required in the script to use it to copy Model dictionary from Eng. Item to Eng. Item, from Mfg. Item to Mfg. Item, Mfg. Item to System, System to Resource, System to System, any objects in PPR structure.

  • Object selection

Based on to which type of object we want to copy Model dictionary we will set its type.

Mfg ItemEng ItemSystemResource
MfgProcessOccurrenceProductOccurrenceProdSystemOccurrenceResourceOccurrence
  • Create and Call respective EKL actions to get and attach Model Dictionary & critria

In our example, we get Model Dictionary & criteria from Eng. Item and attach on Mfg. Item. Similar way create EKL script as per need,

Step 1: Write EKL action to get Model Dictionary from Eng. Item, Mfg. Item, etc...

Step 2: Write EKL action to attach Model Dictionary on Mfg. Item, System, Resource, etc…

For example – if we want to copy effectivity from Mfg. item to System then,

// Assign Get Model Dictionary on Mfg Item EKL action as shown below
// actionExtractFromMfgItemModel = `Knowledge Engineering Specification Physical00000084 A.1\\Relations\\Get Model Dictionary On Mfg Item V1.0`

// Assign Set Model Dictionary on System EKL action as shown below
// actionAttachModelSystem = `Knowledge Engineering Specification Physical00000084 A.1\\Relations\\Set Model Dictionary On System V1.0`

How to Deploy

Please follow the video given below to know how to deploy the above EKL scripts. The video explains the process for scripts related to Mfg. Item. Follow the same procedure for scripts for System and Resources. 

Note: Do not recreate the "Get_Physical_ID", "Get_CSRF_Token" and "HTTP_Request" EKL scripts. They are same/common for the scripts for Mfg. Item, System and Resources.

This video is just for reference please add Model Criteria related arguments as well in the parameters. Also Get_Physical_ID script is not needed now as there is an API available for it.

Author

Author - @RR 

For any queries, please contact to - @KA