EleFront - RefBlock issues

Hello,
I spotted two issues while “stress-testing” EleFront in my script. Running latest 5.1.8 version.
I will attach simplified examples, both .gh and Rhino file.
Hopefully someone from the EleFront crew will spot this report.
What I am doing used to work with EleFront 4.X, but I cannot revert back to it since we globally switched to newer version.

In the first issue I attempt to reference all blocks with certain names, also the nested instances. (Default state)
However, RefBlock component fails (“1. Solution exception:Object reference not set to an instance of an object.”). If “Nested” option is off, then it works.
Unfortunately I need the nested blocks. It appears to happen randomly, but I believe I just don’t see the cause. I suspect, it might have something to do with issue 2 (see below). Sometimes I made it work with a workaround - I first referenced all blocks in the document and then only the desired group of blocks. (Unreliable workaround). It is unreliable because it fails, once there is a bad block in the document (= Issue 2)

Down below I attach two rhino files, one of the contains bad block. The problem should for sure appear in there, but you may also want to compare to “clean” file.

RefBlock bug.gh (21 KB)
WithBadBlock.3dm (13.1 MB)
WithoutBadBlock.3dm (12.9 MB)

Second issue is related to defective blocks.
Our script operates with DWG files provided from different department. Sometimes it contains bad objects or invalid polysurfaces inside of blocks, that cause RefBlock to fail completely.

In such case (bad block is there) I can track following behavior:

  1. Neither of the RefBlock components work (!1. Solution exception:eleFront could not complete the operation because of an invalid object…")
  2. I locate bad block and delete it (no need to purge)
  3. Default state (load certain blocks only) still fails (“1. Solution exception:Object reference not set to an instance of an object.”)
  4. I reference all blocks first (Unreliable workaround) and then, referencing certain blocks only is working.
  5. Then if I reload Default scenario, it works.

Therefore I believe that all of this leads to one issue with handling bad blocks.
If you managed to find what is going on in there, I would have following suggestions:

  • Can RefBlock cast warning and skip bad blocks while at least loading valid blocks instead of loading nothing?

  • Or can RefBlock output the name of bad block?

  • Or can RefBlock load the bad block without the defective object?

Basically, anything that does not interrupt further processing completely.
Overall, EleFront helps us a lot and to be fair our thing might not even be possible without it.
That way I want to express our gratitude for making this publicly available and I hope that little bugs like these will get caught over time.

Hi there - thanks for bringing this up, I will look into it!