Does using `bim.activate_model` take forever, for others as well?

Does using bim.activate_model take forever, for others as well?

steverugi

Comments

  • yes, even on small projects. And sometime its so much that i just save and close and open the file again

  • edited April 2025

    I have been timing this with watch, currently about 32 seconds :).
    Filesize 12 Mb, objects 2 641, Vertices 107 718, Faces 82 118.

  • Yes!
    With voids, showing or hiding (don't remember which) one sometimes also takes a while, or is that just my pc?

  • Update on this thread: now my model takes 1 minute 34 seconds to return from drawing to model view :(
    But from model view to drawing view it takes only couple of seconds.
    Filesize 13,5 Mb, objects 2460, vertices 61454, edges 133179, faces 77774, triangles 84626.
    Bonsai 0.8.3, Blender 4.5.1.

  • @Samppa You would need to update to the nightly release to see it, from after Andrej made this commit: https://github.com/IfcOpenShell/IfcOpenShell/commit/c2730a81d63513d24447ec7372fb0d778d06b9ea
    Does your model have a lot of sibling type-based elements? I did the early investigation for the resulting change. If you are using lots of these, it will probably execute in roughly 1/10 th of the time now. Issues #5696 and #6923 discuss it, and there was a bit more in PR #6940 which was my dumb fix. Then Andrej fixed it properly.
    Any further improvement is a question mark for now.

    theoryshawzoomerSamppa
  • A-mazing! New record 12 seconds with latest release (returning from drawing to model view! Quite appropriate timing with this fix, thank you @Andrej730 and @sjb007 !
    One question, is it possible to not have almost all objects selected when you return to model view?

    theoryshaw
  • Sure. Just needs the following line added at the end of the bim.activate_model operator.

    bpy.ops.object.select_all(action='DESELECT')
    
  • @Samppa said:
    One question, is it possible to not have almost all objects selected when you return to model view?

    Should be fixed after https://github.com/IfcOpenShell/IfcOpenShell/commit/b5e977d7f34e046bec1ccbe4cb4bcdb3eed78fec

    Samppazoomer
  • @Andrej730 I sometimes wonder if you are deliberately finding different ways of doing the same thing just to mess with me. 😆

    Andrej730
Sign In or Register to comment.