[EKL Quick Tips] Adding manually deployment extension

EKL ​​​​​​​Knowledgeware ​​​​​​​

A collegue of mine created, using TXO "Data Model Customization" app, a deployment extension that is automaticlly added to some object, in that cas DELMIA Header Operations("DELLmiHeaderOperationReference"). This issue is ... that we already have on our plateform a bunch of consequent dataset that do not have this extension and which need it.

To avoid reproducing all data, I created a quick EKL script that add manually the Deployment Extention to specific object (in fact all the headeroperatin references). Note that in the script we only add the extension without initializing any attributes but it is very possible.

Script creation steps are :

  1. Create a PLMRuleSet using "Quality Rule Capture" app. (KHC)
  2. Insert a new Rule
  3. Set DELLmiHeaderOperationReference as Input
  4. In the code : check if the reference already has the extension using casting methode (set)
  5. If cast failed, call the AddExtension method on the input reference
  6. Initialize attribute if needed (not done here)


//input : ref (DELLmiHeaderOperationReference)
let ext (xx_HeaderOperationExtension)
set ext = ref
if IsSet(ext) == False
{
          ref.AddExtension("xx_HeaderOperationExtension")
}

Perform the data modification :
1- Activate the root starting from wich objects will be recursilly analyzed.
2- Launche the "PLMSolve" (or PLMSolve with selection) command
3- select the PLMRuleSet from the other tab or using the search bar. Command can be found in the "knowHow reuse" app or using the statusbar "c:PLMSolve"
4- click OK.

After execution, extension is added on all the targeted objects, that are under the active object. In the example, Header operation under "Functionality" node will have the extension whereas "Performance" not.

Before :

After :