/// <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);
    }
Ejemplo n.º 2
0
    public void addBuildingMaterialToXMLList(BuildingMaterial buildingMaterial)
    {
        BuildingMaterialForXML newElement = new BuildingMaterialForXML(buildingMaterial.GetName(), buildingMaterial.GetRegion(), buildingMaterial.GetMaterialType(), buildingMaterial.GetStandard(), buildingMaterial.GetGrade());

        elementsListsForXML.buildingMaterialForXMLList.Add(newElement);
        saveToXML();
    }