Esempio n. 1
0
        public DIALuxAdapter(BH.oM.Adapter.FileSettings fileSettings)
        {
            FileSettings = fileSettings;

            if (!System.IO.Path.HasExtension(fileSettings.FileName) || System.IO.Path.GetExtension(fileSettings.FileName) != ".stf")
            {
                BH.Engine.Reflection.Compute.RecordError("File Name must contain a file extension");
                return;
            }

            // This asks the base Push to only Create the objects.
            m_AdapterSettings.DefaultPushType = oM.Adapter.PushType.CreateOnly;
        }
Esempio n. 2
0
        public EnergyPlusAdapter(BH.oM.Adapter.FileSettings fileSettings, EnergyPlusSettings settings = null)
        {
            m_AdapterSettings.DefaultPushType = oM.Adapter.PushType.CreateOnly;

            FileSettings = fileSettings;
            _settings    = settings ?? new EnergyPlusSettings();

            if (!Path.HasExtension(fileSettings.FileName) || Path.GetExtension(fileSettings.FileName) != ".idf")
            {
                BH.Engine.Base.Compute.RecordError("File Name must contain a file extension");
                return;
            }
        }