Breaking down a model to only blocks visible Visibility States.

I have a block library of parts with visibility states, essentially 11 individual lengths make up 1 mechanical block, and i switch between lengths when needed.

After assembling something around a building 55m x 35m x 30m high with these visibility states blocks the model is insanely slow. It’s obviously because if the model contains 15,000 visibility states blocks each made up with 11 individual blocks then we have a 15,000 x 11 factor.

Is it possible with one or two clicks to strip the model down (dissolving) so only the individual blocks that are currently visible remain and all the hidden ones each instance are deleted?

I suppose of this is possible its all single threaded and going to take forever, as is always the case in this software.

Comments

  • Dynamic blocks have convertToStaticBlock in the API.
    AcDbDynBlockReference::convertToStaticBlock()
    AcDbDynBlockReference::convertToStaticBlock(const AcString& newBlockName)

    I don’t know if there’s an analog for BricsCAD’s parametric block.
    Guessing it would not help, typically the graphics for blocks are cached, are invalidated only when you change the state.
    If the whole drawing is slow, maybe using xrefs would help.

  • ALANH
    edited September 21

    Some ideas ;

    Burst explodes the block, but you end up with lots of objects.

    Part two of the burst is make a new block from the objects.

    Replace the block by inserting a new block based on the visibility state. You can read the visibility state using lisp. I would have the 11 blocks saved externally. Once all blocks changed then purge the dynamic block from the dwg. No reason once you pick the vis state that you could do an undo and insert external block based on prior block XY angle scale etc.. A PS can burst block and use wblock to make the 11 blocks, could be automated for convert lots of dynamic blocks into single blocks. Eg "Window left handed"