# "AfterEditAttributeValue" #The parameter instid contains the model ID of the modified instance, attrid the ID of the changed attribute, #modelid the ID of the model containing the modified instance and attrtypeid the attribute type code: 0=INTEGER, #1=DOUBLE, 2=STRING, 3=DISTRIBUTION, 4=TIME, 5=ENUMERATION, 6=ENUMERATIONLIST, 7=CORE_LONGSTRING, 8=PROGRAMCALL, #9=INTERREF, 10=EXPRESSION, 11=RECORD, 12=ATTRPROFREF, 13=DATE, 14=DATETIME. #SETG id_ModelId:(modelid) #SETG id_InstId:(instid) #SETG id_AttrId:(attrid) #SETG id_AttrTypeId:(attrtypeid) # Get attribute value of the changed attribute CC "Core" GET_ATTR_VAL objid:(id_InstId) attrid:(id_AttrId) attrtypeid:(id_AttrTypeId) # If-string for the first condition for the attribute value IF (val = "No") { #Call the object to change the attribute value CC "Core" GET_CLASS_ID classname:"Gateway" SETL id_ClassId:(classid) CC "Core" GET_OBJ_ID modelid:(id_ModelId) classid:(id_ClassId) objname:"Gateway" SETL id_ObjId:(objid) CC "Core" GET_ATTR_ID classid:(id_ClassId) attrname:"has_status" SET id_AttrId:(attrid) #Change the attribute value CC "Core" SET_ATTR_VAL objid:(id_ObjId) attrid:(id_AttrId) val:"Negative" } ELSIF (val= "Yes") { CC "Core" GET_CLASS_ID classname:"Gateway" SETL id_ClassId:(classid) CC "Core" GET_OBJ_ID modelid:(id_ModelId) classid:(id_ClassId) objname:"Gateway" SETL id_ObjId:(objid) CC "Core" GET_ATTR_ID classid:(id_ClassId) attrname:"has_status" SET id_AttrId:(attrid) CC "Core" SET_ATTR_VAL objid:(id_ObjId) attrid:(id_AttrId) val:"Positive" }