How to delete objects which cannot be found in blender console

Please let me know how to delete ifc objects which cannot be found in blender interface. I believe I did something wrong somewhere.

BlenderBIM tells me that I have 2 transformers.

Below is the result obtained from "Quality and Coordination > Quality Control > Debug > Test All Shapes"

263/285: #107348=IfcTransformer('0zWAck$49EtgaPHI0PcmaV',$,'Cube',$,$,#107381,#107366,$,.VOLTAGE.)
Success 0.0 24 24 36
:
266/285: #107595=IfcTransformer('2lQWmSlWL56AvgLTAUlB6f',$,'cube',$,$,#107987,#107613,$,.VOLTAGE.)
Success 0.0 24 24 36

BimVision also indicates there are 2 trasformers:

However, the one on the top (id=107348) can not be found in Blender...

My system environment:

  • OS: Windows10
  • blender: 4.0.2
  • BlenderBIM: v0.0.24015
steverugi

Comments

  • Are you comfortable with python
    you can use

    import ifcopenshell
    f = ifcopenshell.open(path_to_file)
    ifcopenshell.api.run('root.remove_product', f, product=f.by_guid(GlobalId))
    
    steverugi
  • @Arv
    Thank you for answering my question!
    I have just a limited knowledge on python... I hope I did what you suggested, but nothing happens...

    I entered the file path of my .ifc file for "path_to_file". Am I doing something wrong?

    By the way, the commands you suggested seems to correct the corresponding .ifc file only. In other words, my .blend file is not corrected. Am I right? I mean even if your command succeeds, my .blend file keeps holding this unwanted ifc object.

  • Hi!
    The first question is why the second transformer wasn't loaded? Can you please check if there any errors in system console (Window - Toggle System Console) when .ifc file was loaded or provide some .ifc example to reproduce it?

    If you wan't to explicitly remove that element from .ifc file you indeed can use root.remove_product but also need to f.write(path_to_file) to save the changed and reopen .ifc file in Blender as with root.remove_product you edited .ifc file directly avoiding Blender UI.

  • Thanks @Andrej730
    @yoayo I missed to mentioned that you need to save the file with f.write(path_to_file) and reopen the file back in blenderbim

  • Thank you @Andrej730 , @Arv for the replies!

    While I was reading the comments from both of you, I noticed that my workflow could be wrong at the beginning. So please let me clarify which workflow is the one that BlenderBim does expect. Otherwise, I think I will confuse both of you...

    I was following Workflow A... I should have followed Workflow B?

    Workflow A

    1. Run Blender to start creating a BIM model.
    2. After creating some sfuff in BlenderBim Addon, you save .blend and .ifc files
    3. The next day, you start working the BIM model again,so you start Blender and load the .blend file you created yesterday.

    Workflow B

    1. Run Blender to start creating a BIM model.
    2. After creating some sfuff in BlenderBim Addon, you save .blend and .ifc files
    3. The next day, you start working the BIM model again, so you start Blender and load the .ifc file you created yesterday.

    @Andrej730
    I usually don't load .ifc to create a BIM model, so I don't see 2 trasformers. Anyway, when I loaded .ifc, I can now select 2 of them. Please see the image below:

    @Arv
    Thank you, It worked!

  • My workflow is mostly with .ifc. I use .blend as a temporary file where I need to incorporate and still refer various dxf imports or while assigning a custom blender meshes to ifc class

  • (in theory) both workflows should work exactly the same and .blend file workflow is more practical since it allows you to customize your workspace for specific project.
    Reloading .ifc file is usually needed either if you modified .ifc file directly (using ifcopenshell python scripts or by some other way) or if you suspect there was some issue in your current .blend session and .ifc and .blend are got out of sync (e.g. in your case some element like IfcTransformer is not available from list of objects but still available in .ifc).
    Please report issues with .ifc and .blend going out of sync if you can find any way to reproduce them, as they are very important - even if someone uses a workflow prefering to keep only .ifc file, they never know when it's time to reload and they will meet blender-session-out-of-sync issues too.

  • @Arv

    Thank you for the feedback. It seems your approach sounds better.

    @Andrej730

    I appreciate your tip.

    I know understand what is expected. I will report the issue here when I figure out the procedure to reproduce the unsync situation.

Sign In or Register to comment.