Open GCRA101 opened 1 month ago
@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?
@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.
@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.
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.
Steps to reproduce:
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