public void propMaterialGetMPIsotropic(BuildingMaterial material) { string message = "VRE to SAPTranslator: propMaterialGetMPIsotropic(" + material.GetName() + ")"; sendString(message); material.MPIsotropic = readPropMaterialGetMPIsotropic(); }
public void addBuildingMaterialToXMLList(BuildingMaterial buildingMaterial) { BuildingMaterialForXML newElement = new BuildingMaterialForXML(buildingMaterial.GetName(), buildingMaterial.GetRegion(), buildingMaterial.GetMaterialType(), buildingMaterial.GetStandard(), buildingMaterial.GetGrade()); elementsListsForXML.buildingMaterialForXMLList.Add(newElement); saveToXML(); }
public void deletebuildingMaterialFromXMLList(BuildingMaterial buildingMaterial) { deletebuildingMaterialFromXMLList(buildingMaterial.GetName()); }
/// <summary> /// Sets the material given a BuildingMaterial type /// </summary> public void SetMaterial(BuildingMaterial newMaterial) { buildingMaterialName = newMaterial.GetName(); }
/// <summary> /// Deletes a building material given its name /// </summary> public void deleteBuildingMaterialWithName(string name) { BuildingMaterial bm = findBuildingMaterialWithName(name); if (bm != null) { buildingMaterials.Remove(bm); myXmlController.GetComponent <xmlController>().deletebuildingMaterialFromXMLList(name); string sapTranslatorCommand = "VRE to SAPTranslator: propMaterialDelete(" + bm.GetName() + ")"; // arguments: (name) mySapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand); } if (buildingMaterials.Count == 0) { //addBuildingMaterial(defaultBuildingMaterial); } }
/// <summary> /// Adds a BuildingMaterial to the list of materials /// This is called after a new material is created given its name or name and parameters /// Also sends the data to SAP Translator, /// and tells SAP Translator to set the MPIsotropic object of the material. (currently commented-out) /// </summary> public void addBuildingMaterial(BuildingMaterial newMaterial) { buildingMaterials.Add(newMaterial); myXmlController.GetComponent <xmlController>().addBuildingMaterialToXMLList(newMaterial); string sapTranslatorCommand = "VRE to SAPTranslator: propMaterialAddMaterial(" + newMaterial.GetMaterialType() + ", " + newMaterial.GetRegion() + ", " + newMaterial.GetStandard() + ", " + newMaterial.GetGrade() + ", " + newMaterial.GetName() + ")"; // arguments: (matType, region, standard, grade, userName) mySapTranslatorIpcHandler.enqueueToOutputBuffer(sapTranslatorCommand); //mySapTranslatorIpcHandler.propMaterialGetMPIsotropic(newMaterial); }