void getBarSectionNamesRSA(RobotApplication appRSA) { RobotLabelServer labelsRSA = appRSA.Project.Structure.Labels; //RobotLabel labelRSA; RobotNamesArray namArrRSA = labelsRSA.GetAvailableNames(IRobotLabelType.I_LT_BAR_SECTION); string[] tmp = new string[namArrRSA.Count]; for (int i = 0; i < namArrRSA.Count; i++) { tmp[i] = namArrRSA.Get(i + 1); } NamesSectBar = tmp; }
void getMaterialNameListRSA(RobotApplication appRSA) { RobotLabelServer labelsRSA = appRSA.Project.Structure.Labels; //RobotLabel labelRSA; RobotNamesArray namArrRSA = labelsRSA.GetAvailableNames(IRobotLabelType.I_LT_MATERIAL); string[] tmp = new string[namArrRSA.Count]; for (int i = 0; i < namArrRSA.Count; i++) { tmp[i] = namArrRSA.Get(i + 1); } MaterialsRSA = tmp; }
}//getSectionDatabase public IRobotNamesArray loadProfileDatabase(string database, string type) { //Access the IRobotLabelServer IRobotLabelServer labelServer = getLabelServer(); //Change the current section database string sDBName = database; IRobotSectionDatabase sectionDBase = getSectionDatabase(sDBName); IRobotNamesArray profiles = (RobotNamesArray)sectionDBase.GetAll(); RobotNamesArray filtered = new RobotNamesArray(); int filterSize = 1; for (int i = 1; i < profiles.Count; i++) { //Defines the size of the Array //Console.WriteLine(profiles.Get(i)); if (profiles.Get(i).StartsWith(type)) { filterSize++; } } //Console.WriteLine(filterSize); filtered.SetSize(filterSize); //Labeling the filter int pos = 1; for (int i = 1; i < profiles.Count; i++) { if (profiles.Get(i).StartsWith(type)) { filtered.Set(pos, profiles.Get(i)); pos++; } } return(filtered); }//loadProfileDatabase