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

Fix Bug when Creating Bars in ETABS21 #482

Open
GCRA101 opened this issue Oct 21, 2024 · 3 comments · May be fixed by #483
Open

Fix Bug when Creating Bars in ETABS21 #482

GCRA101 opened this issue Oct 21, 2024 · 3 comments · May be fixed by #483
Assignees
Labels
type:bug Error or unexpected behaviour type:feature New capability or enhancement

Comments

@GCRA101
Copy link
Contributor

GCRA101 commented Oct 21, 2024

Description:

When running the push of bars using ETABS 21, the ETABS API method cFrameObj.SetInsertionPoint() called within the BHoM Create.Bar.cs class fires an exception that interrupts the push.
Neither the BHoM Code and the ETABS API method have changed since the previous version (ETABS 20).
This bug prevents any push of bar objects to ETABS 21 models using the BHoM.

Bug GH Canvas Screenshot

Bug VS Code Screenshot

Steps to reproduce:

  1. Activate the adapter connecting to an instance of ETABS 21
  2. Push bar objects into an ETABS 21 Model

Expected behaviour:

Bars get pushed into the ETABS 21 model as expected.

Test file(s):

https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/01_Issue/BHoM/ETABS_Toolkit/%23482-FixBugWhenCreatingBarsInEtabs21/BHoM%207.3.1%20Test%20-%20Bar%20Object%20Push%20to%20ETABS%2021%201.gh?csf=1&web=1&e=2XWgCj

@GCRA101 GCRA101 added the type:bug Error or unexpected behaviour label Oct 21, 2024
@GCRA101 GCRA101 self-assigned this Oct 21, 2024
@GCRA101 GCRA101 added the type:feature New capability or enhancement label Oct 21, 2024
@GCRA101 GCRA101 changed the title Add Support for ETABS 21 Allow Bars Creation with ETABS21 Oct 21, 2024
@GCRA101 GCRA101 changed the title Allow Bars Creation with ETABS21 Fix Bug when Creating Bars in ETABS21 Oct 21, 2024
@GCRA101
Copy link
Contributor Author

GCRA101 commented Oct 21, 2024

@IsakNaslundBh,
I think that I need your magic wand on this one.

The BHoM method cFrameObj.SetInsertionPoint() works perfectly on ETABS20 but fails when using ETABS21. Checked the ETABS API documentation for ETABS 21 but nothing looks to have changed. Tried also to decompile it and looks identical to the .dll of ETABS2020.... no clue what's going on here :D

Do you have any ideas what the problem could be?

@IsakNaslundBh
Copy link
Contributor

@GCRA101 no real initial idea without further investigation. What is the exception being thrown saying?

Might be possible to at least deactivate this row for ETABS2021 in particular in case we cant find a better solution to actually get it to work. Have not checked, but would hope that the m_app or m_model has some information about which version of Etabs that currently is running. Could add a check so that the line is only run for verisons before 2021, and skip and raise a warning if it is 2021 to at least make the adapter not crash for bars and at all be usable, until a proper solution is found.

@GCRA101
Copy link
Contributor Author

GCRA101 commented Oct 28, 2024

@IsakNaslundBh, @peterjamesnugent,
I think that the issue here might be a bug within the ETABS API.

I've tested the function cFrameObj.SetInsertionPoint() (the one that is giving problems) in a VBA script and it's giving the same error. Tried different possible sorting of the input parameters but none of them works. Looks that inside the function they are trying to cast a double array into a boolean variable.

Error Message in screenshot below.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants