Door type manager previews
Hi,
Is it possible to regenerate Door Type manager preview images of doors?
I've lost almost all of mine in my ifc file. There is now about 22 door types already and they are non parametrical (but not complex). I can still use them but losing those thumbnails is bugging me. I was hoping to find a patch or something that could regenerate them but couldn't find any.
Comments
@Samppa What OS and Bonsai version do you use? I used to have a similar behaviour but is almost not longer happening in Linux or Windows with Bonsai v0.8.2 - alpha250403



You can try to call operator bpy.ops.bim.load_type_thumbnails()
Maybe if this is a recurring issue an entry should be added to the type manager:
You can refer to https://docs.bonsaibim.org/guides/development/hello_world.html#submitting-code-to-git to submit an update like that:
Thanks!
@falken10vdl Thank you, my Bonsai version is now v0.8.2 250402, but project was initially started with v0.8.1 stable.
Tried to update thumbnails with given call, but it didn't recreate them unfortunately.
There is also some funny business going on with how the type manager switches pages when I for example type "10" in the search field and then select a door type from say page 2/3 and the type manager switches to page 3/3 instantly when the door type is clicked. And also quite often type manager always reverts back to one specific door type which I haven't even used for awhile. Think I have to pay attention to this behaviour and then file a bug when I figure out how to really repeat this constantly.
I also keep a separate door creation ifc file which I use as a library for doors. Doors are created and modified there and then imported to main file via Project Library. Wish there could be a way to re-import a modified door type to main file and make it regenerate the existing types in it. Wonder what makes a door type unique in project because sometimes just changing its name in my door creation Ifc file is not enough to make it appear in Project Library with possibility to "Append Library Element" (the small paperclip-icon).
@Samppa That is unfortunate. Do you have an ifc file you can share where this is happening?
Thanks!
@Samppa Maybe you can try this one instead (not load but update)
If that works, then maybe that can be added, so when one clicks the gear of the corresponding type.


It calls update_thumbnail_for_element
Update ui.py So clicking the gear also updates the thumbnail #6503
Regards!
@Massimo Is it possible to link IfcElementTypes?
The project Library is able to append IfcElementTypes to the current project and the link IFC is able to link the IfcElements if I am not mistaken.
If I understand correctly to @Samppa , he is after linking IfcElementTypes.
Regards!
FWIW it is advised against modifying the data state (eg call an operator) while inside a UI draw method, for performance reasons because it is called dozens of times per second and because it might simply lead to a crash.
@Gorgious Thanks for the info! I sincerely go and hack something fast without knowing the basis of how the addon works.
Starting to learn ;)
Thanks!
@Gorgious Correct way would be to implement something like this?
Thanks!
@falken10vdl i don't think so but i'm don't know too much about it...
It is possible anyway to load a type from another library
I think the Ifc Door settings are below, but how well are they supported? Amazing!
IfcDoorTypeEnum : 5,
IfcDoorTypeOperationEnum : 23,
Pset_DoorTypeTurnstile to PEnum_TurnstileType : 3
Pset_DoorPanelProperties to PEnum_DoorPanelOperationEnum : 7,
Pset_DoorPanelProperties to PEnum_DoorPanelPositionEnum : 3,
Pset_DoorTypeTurnstile to PEnum_TurnstileType : 3
Pset_PermeableCoveringProperties to PEnum_PermeableCoveringOperationEnum : 3
Pset_PermeableCoveringProperties to PEnum_WindowPanelPositionEnum : 8 +5
@Gorgious Correct way would be to implement something like this?
Thanks!
Here a possible way of doing it adding outside of the draw method:


"
Added entry in type menu to call for a thumbnail refresh #6517
Thanks!
This looks promising! Hope this will find its way to next release!
BTW if anybody else is also having thumbnail issues on MacOS or Linux, please also try upgrading to Blender 4.4.1 which just came out. Upstream has fixed some glitchy behaviour.