//Extracts information, and returns public string[] GetGroupInformation(ETABS2013.cOAPI ETABS, string groupName) { int ret = 0; int NumberItems = 1; int[] ObjectType = new int[99]; string[] ObjectName = new string[99]; //Gets group by name ret = ETABS.SapModel.GroupDef.GetAssignments(groupName, ref NumberItems, ref ObjectType, ref ObjectName); return(ObjectName); }
//Modify wall (actually creates a new wall type and assigns to object) public void ModifyWall(ref ETABS2013.cOAPI ETABS, double modVal, string objectName) { int ret = 0; //ETABS2013.eWallPropType wallType = default(ETABS2013.eWallPropType); //ETABS2013.eShellType shellType = default(ETABS2013.eShellType); //string matProp = null; //double thickness = 0; //int color = 0; //string notes = null; //string guid = null; double[] baseMod = new double[] { 99 }; string propName = "0"; ret = ETABS.SapModel.AreaObj.GetProperty(objectName, ref propName); //ret = ETABS.SapModel.PropArea.GetWall(objectName, ref wallType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref guid); //Input wall from ETABS to modify ret = ETABS.SapModel.PropArea.GetModifiers(propName, ref baseMod); //Sets new modifier with changed values double[] modifier = new double[10] { modVal, modVal, modVal, baseMod[3], baseMod[4], baseMod[5], baseMod[6], baseMod[7], baseMod[8], baseMod[9] }; ret = ETABS.SapModel.PropArea.SetModifiers(propName, ref modifier); //ret = SapModel.PropArea.SetWall(objectName, wallType, shellType, matProp, thickness, color, notes, newGuid) //ret = SapModel.AreaObj.SetProperty(objectName, objectName) }
//Sets up a wall section type for each shell, named by the shell public void SetupWalls(ref ETABS2013.cOAPI ETABS, string objectName) { int ret = 0; ETABS2013.eWallPropType wallType = default(ETABS2013.eWallPropType); ETABS2013.eShellType shellType = default(ETABS2013.eShellType); string matProp = null; double thickness = 0; int color = 0; string notes = null; string guid = null; string propName = null; ret = ETABS.SapModel.AreaObj.GetProperty(objectName, ref propName); ret = ETABS.SapModel.PropArea.GetWall(propName, ref wallType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref guid); string newGuid = GenerateGUID(); ret = ETABS.SapModel.PropArea.SetWall(objectName, wallType, shellType, matProp, thickness, color, notes, newGuid); ret = ETABS.SapModel.AreaObj.SetProperty(objectName, objectName); }