Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read ETABS Database sections #281

Merged
merged 19 commits into from
Apr 14, 2020
Merged

Conversation

kThorsager
Copy link
Contributor

@kThorsager kThorsager commented Mar 9, 2020

Issues addressed by this PR

Closes #141
Closes #106
Closes #278
The ETABS Adapter now checks the database if there is a existing section with the same name, and if there is uses that instead.

The section name set in BHoM will be the name of the section in ETABS, a note will be displayed if a database section is used

ETABS config has also been renamed to EtabsSettings

see also BHoM/Versioning_Toolkit#38 for versioning

Test files

https://burohappold.sharepoint.com/:u:/s/BHoM/EdeaegrojaNOnj_zOCO1B1gBjTzv3BCfo453TlrGXg1aqg?e=Wb7yLu

Changelog

  • Also changes EtabsConfig to EtabsSettings

Additional comments

@kThorsager kThorsager added type:feature New capability or enhancement status:WIP PR in progress and still in draft, not ready for formal review labels Mar 9, 2020
@kThorsager kThorsager self-assigned this Mar 9, 2020
@kThorsager kThorsager removed the status:WIP PR in progress and still in draft, not ready for formal review label Mar 11, 2020
@kThorsager kThorsager marked this pull request as ready for review March 11, 2020 17:30
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments below, need to fit etabs naming to our naming and good to add an option to opt out of section db loading.

@@ -73,7 +73,16 @@ private bool CreateObject(ISectionProperty bhSection)
return true;
}

SetSection(bhSection as dynamic);
if (!m_DBSectionsNames.Contains(bhSection.Name) || // Does the name not exist in the database or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed before, will need to name converters here, between BHoM and Etabs standard names, this is at least for all UK Sections.

Some things I have noted (so far) are.

General:

  • Etabs uses all capatal casing (ToUpper())
  • Etabs does not use spaces (Replace(" ","")
  • Etabs does not type out ".0" for no decimals

Then some specifics:

  • UB -> UKB
  • UC -> UKC
  • UPB -> UKPB
  • L -> UKA
  • PFC -> UKPFC
  • CHS -> CHHF
  • RHS -> RHHF
  • SHS -> SHHF
  • TUB -> UKT
  • TUC -> UKT

Might want to add some general Convert methods in the adapter to handle this name conversions. All the specifics above holds true for British shapes. For ArcelorMittal_British and ArcelorMittal_BritishHISTAR the UB/UC/UBP names can stay as they are.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a gander through the sections in the BHoM database and the equivalent ones in ETABS database, and as it is now we'll be able to push all of or sections (provided that the dimensions are correct, I'm only fixing the name formatting).

Checked so that our database slots into:
BSShapes2006
AISC14
AISC14M
AISC15
AISC15M
ArcelorMittal_British
ArcelorMittal_BritishHISTAR

and added some pre-formatting on the ETABS section names to facilitate those which have spaces and lowercase letters

ETABS_oM/Enums/SectionDatabase.cs Show resolved Hide resolved
@kThorsager
Copy link
Contributor Author

Or is it to late to merge this @IsakNaslundBh ? It's technically doing compliance as well

Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments regarding some method names. Will test through the code a bit more, but from what I can see, rest looks fine!

Etabs_Adapter/CRUD/Create/SectionProperty.cs Outdated Show resolved Hide resolved
Etabs_Adapter/CRUD/Create/SectionProperty.cs Outdated Show resolved Hide resolved
Etabs_Adapter/CRUD/Create/SectionProperty.cs Outdated Show resolved Hide resolved
Etabs_Adapter/CRUD/Create/SectionProperty.cs Outdated Show resolved Hide resolved
Etabs_Adapter/ETABSAdapter.cs Outdated Show resolved Hide resolved
IsakNaslundBh
IsakNaslundBh previously approved these changes Apr 14, 2020
Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected

@IsakNaslundBh
Copy link
Contributor

/azp run ETABS_Toolkit.CheckInstaller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

would previously have made UBP into UKBP through replacing UB to UKB, which was technichally fine now, but would give some fun buggs later down the line
and name the section to the original BHoM name, avoids issues with keeping track of the name
@FraserGreenroyd
Copy link
Contributor

In a call with @IsakNaslundBh - we have just done a manual rebase fix for this PR to allow it to merge, @IsakNaslundBh will retest (though there should be nothing changed) and re-approve as appropriate 😄

@IsakNaslundBh
Copy link
Contributor

/azp run ETABS_Toolkit.CheckInstaller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@IsakNaslundBh IsakNaslundBh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approval after git fix <3 @FraserGreenroyd

@IsakNaslundBh IsakNaslundBh merged commit 6216160 into master Apr 14, 2020
@IsakNaslundBh IsakNaslundBh deleted the Etabs_Toolkit-#141-Read-DB-sections branch April 14, 2020 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
3 participants