CC "CoreUI" MODEL_SELECT_BOX modeltype:("Preferences Pool Model") title:("Select Preferences Pool Model") boxtext:("Please select a Preferences Pool Model") oktext:("Select") SET n_selected_prefpool_modelid:(modelids) IF (endbutton = "ok") { CC "Core" LOAD_MODEL modelid:(VAL n_selected_prefpool_modelid) CC "Core" GET_ALL_OBJS_OF_CLASSNAME modelid:(VAL n_selected_prefpool_modelid) classname:("Preference Container") #--> RESULT ecode: intValue objids: list . SET s_prefcont_objids:(objids) SET a_listof_objnames:(array(tokcnt(s_prefcont_objids," "))) SET a_listof_objdimension:(array(tokcnt(s_prefcont_objids," "))) SET counter:0 FOR s_prefcont_objid in: (s_prefcont_objids) { CC "Core" GET_OBJ_NAME objid:(VAL s_prefcont_objid) SET a_listof_objnames[counter]:(objname) CC "Core" GET_ATTR_VAL objid:(VAL s_prefcont_objid) attrname:("Dimension") SET a_listof_objdimension[counter]:(val) SET counter:(counter+1) } CC "Modeling" GET_SELECTED #--> RESULT ecode: intValue objids: strValue classid: id . SET s_selected_objid:(objids) CC "Core" GET_CLASS_ID classname:("Process") bp-library SET n_intproc_classid:(classid) CC "Core" GET_ATTR_ID classid:(n_intproc_classid) attrname:("First User Preferences") SET n_inspace_pref_rec_attrid:(attrid) CC "Core" GET_ATTR_ID classid:(n_intproc_classid) attrname:("Second User Preferences") SET n_outspace_pref_rec_attrid:(attrid) CC "Core" GET_REC_CLASS_ID classname:("Preferences") #--> RESULT ecode: intValue classid: id . SET n_corthr_classid:(classid) CC "Core" GET_ATTR_ID classid:(n_corthr_classid) attrname:("Preference") SET n_prefs_pref_attrid:(attrid) CC "Core" GET_ATTR_ID classid:(n_corthr_classid) attrname:("Dimension") SET n_prefs_dimension_attrid:(attrid) FOR i from:0 to:(a_listof_objnames.length - 1) { CC "Core" ADD_REC_ROW objid:(VAL s_selected_objid) attrid:(n_inspace_pref_rec_attrid) #--> RESULT ecode: intValue rowid: id . SET n_pref_rowid:(rowid) SETL temp_val:(a_listof_objnames[i]) SETL temp_val_2:(a_listof_objdimension[i]) CC "Core" SET_ATTR_VAL objid:(n_pref_rowid) attrid:(n_prefs_pref_attrid) val:(temp_val) CC "Core" SET_ATTR_VAL objid:(n_pref_rowid) attrid:(n_prefs_dimension_attrid) val:(temp_val_2) } FOR i from:0 to:(a_listof_objnames.length - 1) { CC "Core" ADD_REC_ROW objid:(VAL s_selected_objid) attrid:(n_outspace_pref_rec_attrid) #--> RESULT ecode: intValue rowid: id . SET n_pref_rowid:(rowid) SETL temp_val:(a_listof_objnames[i]) SETL temp_val_2:(a_listof_objdimension[i]) CC "Core" SET_ATTR_VAL objid:(n_pref_rowid) attrid:(n_prefs_pref_attrid) val:(temp_val) CC "Core" SET_ATTR_VAL objid:(n_pref_rowid) attrid:(n_prefs_dimension_attrid) val:(temp_val_2) } }