[EKL Quick Tips] Create Logical objects (System Architecture) using EKL

EKL Knowledgeware

I make this post for a quick capitalization, on how to create new logical "stuff". Note that RFLP knowledgeware is pretty well documented : Here

Create Logical Reference / Instance :

let logRef (RFLVPMLogicalReference)
logRef = new("RFLVPMLogicalReference","REF_TITLE",NULL)
Associate2DMainview(logRef)
let logInst (RFLVPMLogicalInstance)
logInst = new ("RFLVPMLogicalInstance","INST_NAME",parentLogRef,logRef)
 

 
Create Implement link :

Ref-Ref : 
let cnx(RFLPLMImplementConnection)
cnx=new("RFLPLMImplementConnection", "", NULL, List(logRef1), List(logRef2))

Occ-Occ : a ref-ref link must exist to give a the occ-occ link a context
let cnx(RFLPLMImplementConnection)
//input list contrains only INSTANCES, as the references used for the ref-ref link are "implicit"
let sourceList(List)
let targetList(List)

//Target Instance Stack retrieve later using GetImplementing
targetList.RemoveAll()
targetList.Append(Itf_AS_RFLVPMSystemTypeExpositionInstance) // must be a child of logRef1
//Source Instance Stack retrieve later using GetImplemented
sourceList.RemoveAll()
sourceList.Append(logInst_AS_RFLVPMLogicalInstance) // must be a child of logRef2
sourceList.Append(Itf2_AS_RFLVPMSystemTypeExpositionInstance)
 
cnx=new("RFLPLMImplementConnection", "", NULL, sourceList, targetList)

Retrieve Implement link :
To retrieve implement link we use GetImplementing and GetImplemented methods. To easily know which one to use, you can open the properties tab of an implement link, and look for the "column" you when to retrieve, this column mention "implementing" or "implemented".

let lst_of_resultingImplStack,ImplementStack,lst_resulting_ImplLink (List)
lst_of_resultingImplStack=GetImplementing (ImplementStack,lst_resulting_ImplLink)

ImplementStack input list must containt one refrence for ref-ref link, or a stack of instances for occ-occ link. The same way as for creation ofthe implement link
lst_resulting_ImplLink contains PLMConnection
lst_of_resultingImplStack contains LISTS : each list represent the stack of instances for occ-occ link or one reference for ref-ref link


Create SystemType Interfaces :
This one gave me troubles as... the string given as argument of the "new" method is somehow mapped on the "name" instead of the ususe "Title"... In consequence making this argument mandatory and unique...

let ItfRef (RFLVPMSystemTypeReference)
ItfRef = new ("RFLVPMSystemTypeReference","ITF_TITLE",NULL)

let randomStr (String)
randomStr = "RandomStringgenerated"
 
let ItfInst (RFLVPMSystemTypeExpositionInstance)
ItfInst = new ("RFLVPMSystemTypeExpositionInstance",randomStr,parentLogRef,ItfRef)
ItfInst.Name = ItfRef.Name