BlenderBim: a simple code to test IDS

edited July 2023 in General

Hi guys, i found in the building smart IDS this code:

If i'd like to export to bcf the results is it correct to change the last row as below:
bcf_reporter = reporter.Bcf(my_ids)
report_data = bcf_reporter.report()
bcf_reporter.to_file('PathTo_SampleIDS.bcf')
????
If i'd like to load an .xml IDS file how i can change the first part of the script?
Hope everything is clear.
Thanks in advice for your reply

Comments

  • specs = ifctester.ids.open('/path/to/requirements.ids')
    specs.validate(ifc)
    
  • edited July 2023

    Thanks a lot @Moult . If somone is interested below the code to create a bcf from a .xml IDS file:

    import ifcopenshell
    import ifctester
    from ifctester import reporter

    specs = ifctester.ids.open('C:\PathToFile.ids')

    my_ifc = ifcopenshell.open(r'C:\PathToFile.ifc')

    specs.validate(my_ifc)

    bcf_reporter = reporter.Bcf(specs)
    report_data = bcf_reporter.report()
    bcf_reporter.to_file('C:\PathToFile.bcf')

    My workflow is:

    • use @c4rlosdias https://idsconverter.herokuapp.com/ tool to create IDS file.
    • Use the script in Blender
    • Visualize the results in BlenderBim loading the bcf file and for faucets that not concern IfcElements use "Ifc Tester" module inside BlenderBim that gives an Html file

    AMAZING

Sign In or Register to comment.