Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
Source | List |
Read | List of size 1 including a DELLmiOperationPPRReferencence |
Target | List | Read | List of size 1 including a DELTimeAnalysisRepReference |
RelationType | String | Read | Its value is TimeAnalysisRepresentationInstance |
RelationObject | ObjectType | Read | Set with a DELTimeAnalysisRepInstance
|
Sample
The following sample shows how to use the opening ID to set the name of the time analysis according to the operation name. In this example, the time analysis will be renamed as Rep Of <name of operation>
.
let PointingObj(List)
let PointedObj(List)
let NbPointingObj(Integer)
let NbPointedObj(Integer)
let RelationName(String)
let OperationName(String)
let OperationReference(DELLmiOperationPPRReference)
let TARepReference(DELTimeAnalysisRepReference)
let TARepInstance(DELTimeAnalysisRepInstance)
Let Prefix(String)
Prefix = "Rep of "
set PointingObj = Parameters->GetAttributeObject("Source")
set PointedObj = Parameters->GetAttributeObject("Target")
set RelationName = Parameters->GetAttributeString("RelationType")
set TARepInstance = Parameters->GetAttributeObject("RelationObject")
Validation = false
NbPointedObj = PointedObj.Size()
NbPointingObj = PointingObj.Size()
If (NbPointedObj == 1 && NbPointingObj == 1){
if (RelationName == " TimeAnalysisRepresentationInstance"){
Set OperationReference=PointingObj.GetItem(1)
Set TARepReference=PointedObj.GetItem(1)
If (OperationReference <> NULL && TARepReference <> NULL && TARepInstance <> NULL){
OperationName =OperationReference.Name
TARepReference.Name= Prefix + OperationName
Validation = true
}
}
}