Ejemplo n.º 1
0
        public SAMTSDDocument(string path, bool readOnly = false)
        {
            this.readOnly = readOnly;

            if (string.IsNullOrWhiteSpace(path))
            {
                return;
            }

            if (File.Exists(path))
            {
                FileInfo fileInfo = new FileInfo(path);

                if (Core.Query.Locked(fileInfo))
                {
                    readOnly = true;
                }
            }

            try
            {
                if (readOnly)
                {
                    TSDDocument.openReadOnly(path);
                }
                else
                {
                    TSDDocument.open(path);
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 2
0
        public static List <Core.Result> AddResults(this TSDDocument tSDDocument, AdjacencyCluster adjacencyCLuster)
        {
            if (tSDDocument == null || adjacencyCLuster == null)
            {
                return(null);
            }

            return(AddResults(tSDDocument.SimulationData, adjacencyCLuster));
        }
Ejemplo n.º 3
0
        public static List <Core.Result> AddResults(this TSDDocument tSDDocument, BuildingModel buildingModel)
        {
            if (tSDDocument == null || buildingModel == null)
            {
                return(null);
            }

            return(AddResults(tSDDocument.SimulationData, buildingModel));
        }
Ejemplo n.º 4
0
        public static WeatherYear WeatherYear(this TSDDocument tSDDocument, int year = 2018)
        {
            if (tSDDocument == null)
            {
                return(null);
            }

            return(WeatherYear(tSDDocument.SimulationData, year));
        }
Ejemplo n.º 5
0
 public static AdjacencyCluster ToSAM(this TSDDocument tSDDocument, IEnumerable <SpaceDataType> spaceDataTypes = null, IEnumerable <PanelDataType> panelDataTypes = null)
 {
     return(ToSAM(tSDDocument?.SimulationData?.GetBuildingData(), spaceDataTypes, panelDataTypes));
 }