Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
37be60c
Add SAM simulation engine roadmap
michaldengusiak Jul 1, 2026
94dfce9
refactor(gh): modernise legacy Grasshopper components (#6)
michaldengusiak Jul 18, 2026
bf75bf3
Implement native SAM analytical model to OpenStudio conversion (#7)
SAM-BIM-AI Jul 19, 2026
b138a65
docs: audit complete SAM analytical translation coverage
michaldengusiak Jul 19, 2026
0edf26f
refactor: harden OpenStudio analytical adapter
SAM-BIM-AI Jul 19, 2026
314a259
feat: complete internal condition and schedule translation
SAM-BIM-AI Jul 20, 2026
3e108a3
feat: complete fenestration and construction translation
SAM-BIM-AI Jul 20, 2026
1748f54
feat: complete OpenStudio weather and simulation settings
SAM-BIM-AI Jul 20, 2026
659b4ca
feat: expand OpenStudio results translation
SAM-BIM-AI Jul 20, 2026
b1036eb
feat: add cancellable OpenStudio simulation execution
SAM-BIM-AI Jul 20, 2026
d1fc7fd
test: validate complete SAM analytical translation
SAM-BIM-AI Jul 20, 2026
1b8cbc0
fix: deploy System.Data.SQLite assets so Ideal Loads results can be read
SAM-BIM-AI Jul 20, 2026
e48352b
fix: wind panel surfaces to the panel outward normal
SAM-BIM-AI Jul 20, 2026
db380a7
docs: record independent completeness review findings (stage C)
SAM-BIM-AI Jul 20, 2026
dda59b0
fix: emit declared coverage diagnostics for unconverted parameters (r…
michaldengusiak Jul 20, 2026
600ef2b
fix: select the ASHRAE heating/cooling design-day pair from DDY impor…
michaldengusiak Jul 20, 2026
ec7123f
fix: compute SQL hour-of-year against the run calendar in leap years …
michaldengusiak Jul 20, 2026
e5e72ff
fix: enforce stale-manifest-id detection and remove two stale rows (r…
michaldengusiak Jul 20, 2026
ff93d89
fix: warn when a non-hourly output frequency mis-scales extracted pea…
michaldengusiak Jul 20, 2026
d631e18
fix: validate the SAM Location site override before writing OS:Site (…
michaldengusiak Jul 20, 2026
68adfa4
fix: cancel Grasshopper simulations on component removal and document…
michaldengusiak Jul 20, 2026
68d09f5
fix: repair encoding corruption in the coverage document and manifest…
michaldengusiak Jul 20, 2026
46f2a00
docs: record Stage L corrections and final validation evidence (stage…
michaldengusiak Jul 20, 2026
ad081ba
fix: add missing SPDX/copyright header to Create/Model.cs
michaldengusiak Jul 20, 2026
11ba41e
feat: use analytical model weather and design days in OpenStudio conv…
SAM-BIM-AI Jul 20, 2026
d0f5152
fix: normalise EnergyPlus SQL timestamps when creating design days
SAM-BIM-AI Jul 20, 2026
733a2b0
fix: add space and surface simulation results from SQL
SAM-BIM-AI Jul 20, 2026
4db5d97
test: end-to-end EnergyPlus gate for the fully-embedded route
SAM-BIM-AI Jul 20, 2026
c6ce23b
fix: relate EnergyPlus subsurface results to the panel hosting the ap…
SAM-BIM-AI Jul 20, 2026
373d820
test: gate the exported EPW daylight-saving header
SAM-BIM-AI Jul 21, 2026
95e28f0
fix: record an absolute weather_file in the generated OSW
SAM-BIM-AI Jul 21, 2026
8973747
fix: key the SimpleGlazing cache on the resolved aperture performance
SAM-BIM-AI Jul 21, 2026
28f1bb0
docs: escape the Guid-suffix token in the AddResults doc comment
SAM-BIM-AI Jul 21, 2026
197eba3
chore: add the SPDX/copyright header to the eight files missing it
SAM-BIM-AI Jul 21, 2026
c009487
fix: reference results by SAM Guid and resolve windows through their …
SAM-BIM-AI Jul 21, 2026
318e26d
chore: add the SPDX/copyright header to the four files touched in c00…
SAM-BIM-AI Jul 21, 2026
d60e7e3
docs: explain result Reference mapping and the two space-result families
SAM-BIM-AI Jul 21, 2026
6873e0f
refactor: adopt the SAM core async base, TryGetDateTime and Variables…
SAM-BIM-AI Jul 21, 2026
32fa4fc
fix: honour the Adiabatic panel flag in the surface boundary condition
SAM-BIM-AI Jul 21, 2026
9af9990
feat: opt-in inter-zone air mixing across Air panels
SAM-BIM-AI Jul 21, 2026
bb985ed
Complete SAM analytical translation to OpenStudio (v1) with independe…
SAM-BIM-AI Jul 21, 2026
c5bafbc
feat: PixelCounting default, caller measures and additional IDF strings
SAM-BIM-AI Jul 21, 2026
b11fa16
ci: resolve the parent sow quarter branch for dependency clones on pu…
SAM-BIM-AI Jul 21, 2026
10c4004
ci: fix repo-variable shadowing in the dependency clone loop
SAM-BIM-AI Jul 21, 2026
d962b6e
fix: reject EnergyPlus-degenerate slivers and name non-convex casting…
SAM-BIM-AI Jul 21, 2026
a664bef
Merge pull request #9 from SAM-BIM/sow/2026-Q3-pixelcounting-addstr
michaldengusiak Jul 21, 2026
686d7d2
feat: add 'Go to Directory' context menu and normalise GH outputs
SAM-BIM-AI Jul 21, 2026
3fd556a
Merge pull request #10 from SAM-BIM/sow/2026-Q3-gotodirectory-outputc…
michaldengusiak Jul 21, 2026
5f46a2b
B0 audit: document OpenStudio-to-SAM mapping and baseline
SAM-BIM-AI Jul 21, 2026
891d27c
B1 core: add OSM/OSW import options, context, result and diagnostics
SAM-BIM-AI Jul 21, 2026
20ee1e1
docs(diagnostic): clarify SAM-OS-GEO-003 does not detect GPU absence
michaldengusiak Jul 21, 2026
f49d50f
B2 geometry: convert spaces, surfaces, subsurfaces and shading
SAM-BIM-AI Jul 21, 2026
451018b
B4 libraries: convert constructions and materials
SAM-BIM-AI Jul 21, 2026
5f9c6f2
B5 conditions: convert loads, controls, schedules and profiles
SAM-BIM-AI Jul 21, 2026
a77b076
B3 topology: build adjacency cluster and shared-panel relations
SAM-BIM-AI Jul 21, 2026
52d2840
fix(designday): reject implausible SAM design-day barometric pressure
michaldengusiak Jul 21, 2026
eeb174a
B6 workflow: resolve and execute OSW inputs
SAM-BIM-AI Jul 21, 2026
a92b87e
B7 gh: add OpenStudio.SAMAnalytical component
SAM-BIM-AI Jul 21, 2026
f5ae51b
Merge pull request #12 from SAM-BIM/sow/2026-Q3-pixelcounting-diagnos…
michaldengusiak Jul 21, 2026
eece6c2
Merge pull request #13 from SAM-BIM/sow/2026-Q3-designday-pressure-va…
michaldengusiak Jul 21, 2026
1c52190
B8 tests: add fixtures, round-trip gates and coverage enforcement
SAM-BIM-AI Jul 21, 2026
bd13f85
B9 docs: document usage, limitations and validation
SAM-BIM-AI Jul 21, 2026
246bb17
B10 fix: harden space location and aperture-construction identity on …
SAM-BIM-AI Jul 22, 2026
92bae64
B11 feat: embed hourly weather from the referenced EPW on import
SAM-BIM-AI Jul 22, 2026
484589f
B12 fix: separate vertex cleaning from invalid geometry in import dia…
SAM-BIM-AI Jul 22, 2026
7dc4ae8
B13 fix: an executed OSW without simulation results is a successful i…
SAM-BIM-AI Jul 22, 2026
3a5a675
B14 fix: do not pin run_directory in the staged OSW - it hid results …
SAM-BIM-AI Jul 22, 2026
f00ea8a
B15 fix: pin the staged OSW run_directory to <staged>/run
SAM-BIM-AI Jul 22, 2026
e8153f6
B16 fix: address four release blockers in OpenStudio->SAM import
michaldengusiak Jul 22, 2026
0befb4f
Fix interval schedule calendar resampling
michaldengusiak Jul 22, 2026
e1d52b0
Merge pull request #14 from SAM-BIM/feature/openstudio-to-sam-analytical
michaldengusiak Jul 22, 2026
1336467
B1b: CI builds the B1a benchmark schema before SAM_OpenStudio
SAM-BIM-AI Jul 24, 2026
5e95314
B1b: ToBenchmark mapping + OpenStudioBenchmarkContext
SAM-BIM-AI Jul 24, 2026
652f815
B1b: benchmark-openstudio CLI + offline producer tests
SAM-BIM-AI Jul 24, 2026
b3a404c
B1b: live SingleBox test pins annual consumption to kWh
SAM-BIM-AI Jul 24, 2026
0332805
B1b: adopt shared CLI host, run tests in CI, add golden + CLI tests
michaldengusiak Jul 24, 2026
3de8a4c
Merge pull request #16 from SAM-BIM/feature/benchmark-b1-os-producer
michaldengusiak Jul 24, 2026
1ae8637
B1b: derive designDaySource from the route, never hardcode None (#17)
michaldengusiak Jul 25, 2026
67a6688
fix(designday): write standard pressure when SAM carries no pressure …
michaldengusiak Jul 25, 2026
f86c4c5
fix(benchmark): propagate conversion diagnostics on successful runs t…
michaldengusiak Jul 25, 2026
4306625
feat(results): per-space design loads from ZoneSizes (closes 10 of 28…
michaldengusiak Jul 26, 2026
269359e
Add AI agent instructions and project progress tracking
michaldengusiak Aug 18, 2026
109441a
build: remove missed .NET Framework app.config leftover
michaldengusiak Sep 22, 2026
6972b3e
Merge pull request #21 from SAM-BIM/build/netfx-cleanup-closeout
michaldengusiak Sep 22, 2026
930bccd
chore: remove internal agent/progress files and evidence artifacts fr…
michaldengusiak Oct 1, 2026
8ffbf69
docs: redact personal/local paths for upstream contribution
michaldengusiak Oct 1, 2026
68a428f
docs: remove internal AI/process provenance wording
Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The benchmark producer golden fixtures are asserted byte-for-byte against the serializer
# output, which is UTF-8 without BOM and uses LF newlines. Pin them to LF so Git's autocrlf
# setting cannot rewrite them to CRLF on checkout and break the byte-stability comparison.
benchmark/**/*.json text eol=lf
85 changes: 85 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,62 @@ jobs:
# Current sow branch: base_ref on PR events, ref_name on push events.
$sowRef = if ($baseRef -match '^sow/') { $baseRef } elseif ($refName -match '^sow/') { $refName } else { '' }
if ($sowRef -and $sowRef -ne $headRef) { $candidates += $sowRef }
# Feature branches off a quarterly sow branch (e.g. sow/2026-Q3-feature): the
# quarter branch itself carries the matching dependency state. Without this a
# push-event build (no head/base ref) falls straight to the stale fallback below.
# NOTE: the loop variable must NOT be $r — that is the outer repo-name variable.
foreach ($branchRef in @($headRef, $baseRef, $refName)) {
if ($branchRef -match '^sow/(\d{4}-Q\d)') {
$quarterRef = "sow/$($Matches[1])"
if ($candidates -notcontains $quarterRef) { $candidates += $quarterRef }
}
}
$candidates += 'sow/2026-Q2'
$cloned = $false
foreach ($cand in $candidates) {
$has = (git ls-remote --heads "https://github.com/$org/$r.git" $cand 2>$null | Out-String).Trim()
if ($has) {
Write-Host "Cloning $org/$r @ $cand"
git clone --depth 1 --branch $cand "https://github.com/$org/$r.git" $r
$cloned = $true
break
}
}
if (-not $cloned) {
Write-Host "Cloning $org/$r @ default branch"
git clone --depth 1 "https://github.com/$org/$r.git" $r
}
}


- name: Build benchmark schema (SAM_Validation)
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'

$org = '${{ env.ORG_NAME }}'
$r = 'SAM_Validation'

# Clone SAM_Validation as a sibling (same branch-candidate fallback as the deps step
# above), then build ONLY the engine-neutral benchmark schema (B1a) into its build\
# folder. The B1b producer references it by HintPath
# (..\..\..\SAM_Validation\build\SAM.Analytical.Benchmark.dll), so it must exist before
# SAM_OpenStudio is built below. The schema project is standalone (netstandard2.0,
# System.Text.Json only) — no other SAM_Validation project is built.
if (-not (Test-Path $r)) {
$headRef = '${{ github.head_ref }}'
$baseRef = '${{ github.base_ref }}'
$refName = '${{ github.ref_name }}'
$candidates = @()
if ($headRef) { $candidates += $headRef }
$sowRef = if ($baseRef -match '^sow/') { $baseRef } elseif ($refName -match '^sow/') { $refName } else { '' }
if ($sowRef -and $sowRef -ne $headRef) { $candidates += $sowRef }
foreach ($branchRef in @($headRef, $baseRef, $refName)) {
if ($branchRef -match '^sow/(\d{4}-Q\d)') {
$quarterRef = "sow/$($Matches[1])"
if ($candidates -notcontains $quarterRef) { $candidates += $quarterRef }
}
}
$candidates += 'sow/2026-Q2'
$cloned = $false
foreach ($cand in $candidates) {
Expand All @@ -106,6 +162,14 @@ jobs:
}
}

$csproj = Join-Path $r 'SAM.Analytical.Benchmark/SAM.Analytical.Benchmark.csproj'
Write-Host "==> Building benchmark schema: $csproj"
& dotnet build $csproj -c Release '/p:SAMVersion=${{ steps.ver.outputs.samversion }}'
if ($LASTEXITCODE -ne 0) { throw "Benchmark schema build failed" }

$dll = Join-Path $r 'build/SAM.Analytical.Benchmark.dll'
if (-not (Test-Path $dll)) { throw "Expected schema DLL missing after build: $dll" }
Write-Host "Schema DLL present: $dll"

- name: Restore + Rebuild in order (safe Platform handling)
shell: pwsh
Expand Down Expand Up @@ -188,6 +252,27 @@ jobs:
if ($LASTEXITCODE -ne 0) { throw "Rebuild failed: $($it.Repo)" }
}

- name: Run benchmark producer tests (offline)
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'

$repo = '${{ env.REPO_NAME }}'

# Run the portable B1b producer tests: the C5 -> B1a mapping, the committed golden
# JSON byte-stability check and the CLI contract tests. The single live end-to-end
# test is [Category("Simulation")] and is excluded here (it needs an OpenStudio/
# EnergyPlus install); it remains available for an environment-gated run.
$testProject = Join-Path $repo 'benchmark/SAM.Analytical.OpenStudio.Benchmark.Tests/SAM.Analytical.OpenStudio.Benchmark.Tests.csproj'
Write-Host "==> Testing (excluding Simulation): $testProject"
& dotnet test $testProject `
-c Release `
'/p:Platform=x64' `
'/p:SAMVersion=${{ steps.ver.outputs.samversion }}' `
--filter 'TestCategory!=Simulation' `
--logger 'console;verbosity=normal'
if ($LASTEXITCODE -ne 0) { throw "Benchmark producer tests failed" }

- name: Upload build folders (optional)
uses: actions/upload-artifact@v4
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors

using Grasshopper.Kernel;
using Grasshopper.Kernel.Types;
using System.Linq;

namespace SAM.Analytical.Grasshopper.OpenStudio
{
/// <summary>
/// Shared helpers for the "Go to Directory" context-menu item (same behaviour as
/// SAMAnalytical.Paths in the SAM repository): the path is read from the volatile data
/// of an input parameter and opened in Windows Explorer.
/// </summary>
internal static class MenuHelper
{
internal static string GetVolatileString(GH_Component component, string name)
{
int index = component.Params.IndexOfInputParam(name);
if (index == -1)
{
return null;
}

object @object = component.Params.Input[index].VolatileData.AllData(true)?.OfType<object>()?.FirstOrDefault();
if (@object is IGH_Goo)
{
return (@object as dynamic).Value?.ToString();
}

return null;
}

internal static void GoToDirectory(string directory, bool create)
{
if (string.IsNullOrWhiteSpace(directory))
{
return;
}

if (create)
{
Core.Create.Directory(directory);
}

if (!System.IO.Directory.Exists(directory))
{
return;
}

Core.Query.StartProcess(directory);
}

internal static void GoToFileDirectory(string path)
{
if (string.IsNullOrWhiteSpace(path) || !System.IO.File.Exists(path))
{
return;
}

GoToDirectory(System.IO.Path.GetDirectoryName(path), false);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
using Grasshopper.Kernel;
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors

using Grasshopper.Kernel;
using SAM.Core.Grasshopper;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace SAM.Analytical.Grasshopper.OpenStudio
{
public class OpenStudioCreateDesignDaysBySQL : GH_SAMComponent
public class OpenStudioCreateDesignDaysBySQL : GH_SAMVariableOutputParameterComponent
{
/// <summary>
/// Gets the unique ID for this component. Do not change this ID after release.
Expand All @@ -15,7 +19,7 @@ public class OpenStudioCreateDesignDaysBySQL : GH_SAMComponent
/// <summary>
/// The latest version of this component
/// </summary>
public override string LatestComponentVersion => "1.0.0";
public override string LatestComponentVersion => "1.0.3";

/// <summary>
/// Provides an Icon for the component.
Expand All @@ -32,20 +36,43 @@ public OpenStudioCreateDesignDaysBySQL()
{
}

public override void AppendAdditionalMenuItems(ToolStripDropDown menu)
{
base.AppendAdditionalMenuItems(menu);

Menu_AppendSeparator(menu);
Menu_AppendItem(menu, "Go to Directory", Menu_GoToDirectory, Properties.Resources.SAM_Small, true, false);
}

void Menu_GoToDirectory(object sender, EventArgs e)
{
MenuHelper.GoToFileDirectory(MenuHelper.GetVolatileString(this, "_sQLPath"));
}

/// <summary>
/// Registers all the input parameters for this component.
/// </summary>
protected override void RegisterInputParams(GH_InputParamManager inputParamManager)
protected override GH_SAMParam[] Inputs
{
inputParamManager.AddTextParameter("_sQLPath", "_sQLPath", "SQL File Path", GH_ParamAccess.item);
get
{
List<GH_SAMParam> result = new List<GH_SAMParam>();
result.Add(new GH_SAMParam(new global::Grasshopper.Kernel.Parameters.Param_String() { Name = "_sQLPath", NickName = "_sQLPath", Description = "SQL File Path", Access = GH_ParamAccess.item }, ParamVisibility.Binding));
return result.ToArray();
}
}

/// <summary>
/// Registers all the output parameters for this component.
/// </summary>
protected override void RegisterOutputParams(GH_OutputParamManager outputParamManager)
protected override GH_SAMParam[] Outputs
{
outputParamManager.AddParameter(new GooAnalyticalObjectParam(), "designDays", "designDays", "SAM Analytical DesignDays", GH_ParamAccess.list);
get
{
List<GH_SAMParam> result = new List<GH_SAMParam>();
result.Add(new GH_SAMParam(new GooAnalyticalObjectParam() { Name = "designDays", NickName = "designDays", Description = "SAM Analytical DesignDays", Access = GH_ParamAccess.list }, ParamVisibility.Binding));
return result.ToArray();
}
}

/// <summary>
Expand All @@ -55,15 +82,38 @@ protected override void RegisterOutputParams(GH_OutputParamManager outputParamMa
protected override void SolveInstance(IGH_DataAccess dataAccess)
{
string path = null;
if (!dataAccess.GetData(0, ref path) || path == null)
int index = Params.IndexOfInputParam("_sQLPath");
if (index == -1 || !dataAccess.GetData(index, ref path) || path == null)
{
AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Invalid data");
return;
}

List<DesignDay> result = Analytical.OpenStudio.Create.DesignDays(path);
List<DesignDay> result = null;
List<string> diagnostics = null;
try
{
result = Analytical.OpenStudio.Create.DesignDays(path, out diagnostics);
}
catch (Exception exception)
{
// Malformed SQL content is a structured diagnostic, never a solution exception.
AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, string.Format("Design days could not be read: {0}", exception.Message));
}

if (diagnostics != null)
{
foreach (string diagnostic in diagnostics)
{
AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, diagnostic);
}
}

dataAccess.SetDataList(0, result);
index = Params.IndexOfOutputParam("designDays");
if (index != -1)
{
dataAccess.SetDataList(index, result);
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
using Grasshopper.Kernel;
// SPDX-License-Identifier: LGPL-3.0-or-later
// Copyright (c) 2020–2026 Michal Dengusiak & Jakub Ziolkowski and contributors

using Grasshopper.Kernel;
using SAM.Core.Grasshopper;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace SAM.Analytical.Grasshopper.OpenStudio
{
public class OpenStudioCreateSpaceSimulationResultsBySQL : GH_SAMComponent
public class OpenStudioCreateSpaceSimulationResultsBySQL : GH_SAMVariableOutputParameterComponent
{
/// <summary>
/// Gets the unique ID for this component. Do not change this ID after release.
Expand All @@ -14,7 +19,7 @@ public class OpenStudioCreateSpaceSimulationResultsBySQL : GH_SAMComponent
/// <summary>
/// The latest version of this component
/// </summary>
public override string LatestComponentVersion => "1.0.1";
public override string LatestComponentVersion => "1.0.3";

/// <summary>
/// Provides an Icon for the component.
Expand All @@ -31,20 +36,43 @@ public OpenStudioCreateSpaceSimulationResultsBySQL()
{
}

public override void AppendAdditionalMenuItems(ToolStripDropDown menu)
{
base.AppendAdditionalMenuItems(menu);

Menu_AppendSeparator(menu);
Menu_AppendItem(menu, "Go to Directory", Menu_GoToDirectory, Properties.Resources.SAM_Small, true, false);
}

void Menu_GoToDirectory(object sender, EventArgs e)
{
MenuHelper.GoToFileDirectory(MenuHelper.GetVolatileString(this, "_sQLPath"));
}

/// <summary>
/// Registers all the input parameters for this component.
/// </summary>
protected override void RegisterInputParams(GH_InputParamManager inputParamManager)
protected override GH_SAMParam[] Inputs
{
inputParamManager.AddTextParameter("_sQLPath", "_sQLPath", "SQL File Path", GH_ParamAccess.item);
get
{
List<GH_SAMParam> result = new List<GH_SAMParam>();
result.Add(new GH_SAMParam(new global::Grasshopper.Kernel.Parameters.Param_String() { Name = "_sQLPath", NickName = "_sQLPath", Description = "SQL File Path", Access = GH_ParamAccess.item }, ParamVisibility.Binding));
return result.ToArray();
}
}

/// <summary>
/// Registers all the output parameters for this component.
/// </summary>
protected override void RegisterOutputParams(GH_OutputParamManager outputParamManager)
protected override GH_SAMParam[] Outputs
{
outputParamManager.AddParameter(new GooResultParam(), "spaceSymulationResults", "spaceSymulationResults", "SAM Analytical SpaceSimulationResults", GH_ParamAccess.list);
get
{
List<GH_SAMParam> result = new List<GH_SAMParam>();
result.Add(new GH_SAMParam(new GooResultParam() { Name = "spaceSymulationResults", NickName = "spaceSymulationResults", Description = "SAM Analytical SpaceSimulationResults", Access = GH_ParamAccess.list }, ParamVisibility.Binding));
return result.ToArray();
}
}

/// <summary>
Expand All @@ -55,13 +83,18 @@ protected override void SolveInstance(IGH_DataAccess dataAccess)
{
string path = null;

if (!dataAccess.GetData(0, ref path) || path == null)
int index = Params.IndexOfInputParam("_sQLPath");
if (index == -1 || !dataAccess.GetData(index, ref path) || path == null)
{
AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Invalid data");
return;
}

dataAccess.SetDataList(0, Analytical.OpenStudio.Create.SpaceSimulationResults(path)?.ConvertAll(x => new GooResult(x)));
index = Params.IndexOfOutputParam("spaceSymulationResults");
if (index != -1)
{
dataAccess.SetDataList(index, Analytical.OpenStudio.Create.SpaceSimulationResults(path)?.ConvertAll(x => new GooResult(x)));
}
}
}
}
}
Loading
Loading