Skip to content

Commit

Permalink
bjorn/cnx-397-etabs-frame-properties (#3627)
Browse files Browse the repository at this point in the history
enum Update

Duplicate enum pointing to essentially the same thing. STRUCTURAL_BOTTOM_RELEASE_ was used, but we also have a STRUCTURAL_START_RELEASE_ enum which returns something when calling get_Parameter(). The enum we were using always returns none for get_Parameter() hence why always defaulted to "F".
  • Loading branch information
bjoernsteinhagen authored Sep 16, 2024
1 parent c791206 commit 03d12af
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,12 @@ private void SetEndReleases(Element revitStick, ref Element1D speckleElement1D)
}
else
{
var botReleaseX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_BOTTOM_RELEASE_FX) == 1 ? "R" : "F";
var botReleaseY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_BOTTOM_RELEASE_FY) == 1 ? "R" : "F";
var botReleaseZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_BOTTOM_RELEASE_FZ) == 1 ? "R" : "F";
var botReleaseXX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_BOTTOM_RELEASE_MX) == 1 ? "R" : "F";
var botReleaseYY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_BOTTOM_RELEASE_MY) == 1 ? "R" : "F";
var botReleaseZZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_BOTTOM_RELEASE_MZ) == 1 ? "R" : "F";
var botReleaseX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_START_RELEASE_FX) == 1 ? "R" : "F";
var botReleaseY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_START_RELEASE_FY) == 1 ? "R" : "F";
var botReleaseZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_START_RELEASE_FZ) == 1 ? "R" : "F";
var botReleaseXX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_START_RELEASE_MX) == 1 ? "R" : "F";
var botReleaseYY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_START_RELEASE_MY) == 1 ? "R" : "F";
var botReleaseZZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_START_RELEASE_MZ) == 1 ? "R" : "F";

string botReleaseCode = botReleaseX + botReleaseY + botReleaseZ + botReleaseXX + botReleaseYY + botReleaseZZ;
speckleElement1D.end1Releases = new Restraint(botReleaseCode);
Expand All @@ -447,12 +447,12 @@ private void SetEndReleases(Element revitStick, ref Element1D speckleElement1D)
}
else
{
var topReleaseX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_TOP_RELEASE_FX) == 1 ? "R" : "F";
var topReleaseY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_TOP_RELEASE_FY) == 1 ? "R" : "F";
var topReleaseZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_TOP_RELEASE_FZ) == 1 ? "R" : "F";
var topReleaseXX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_TOP_RELEASE_MX) == 1 ? "R" : "F";
var topReleaseYY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_TOP_RELEASE_MY) == 1 ? "R" : "F";
var topReleaseZZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_TOP_RELEASE_MZ) == 1 ? "R" : "F";
var topReleaseX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_END_RELEASE_FX) == 1 ? "R" : "F";
var topReleaseY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_END_RELEASE_FY) == 1 ? "R" : "F";
var topReleaseZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_END_RELEASE_FZ) == 1 ? "R" : "F";
var topReleaseXX = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_END_RELEASE_MX) == 1 ? "R" : "F";
var topReleaseYY = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_END_RELEASE_MY) == 1 ? "R" : "F";
var topReleaseZZ = GetParamValue<int>(revitStick, BuiltInParameter.STRUCTURAL_END_RELEASE_MZ) == 1 ? "R" : "F";

string topReleaseCode = topReleaseX + topReleaseY + topReleaseZ + topReleaseXX + topReleaseYY + topReleaseZZ;
speckleElement1D.end2Releases = new Restraint(topReleaseCode);
Expand Down

0 comments on commit 03d12af

Please sign in to comment.