(ifc)
| 33 | |
| 34 | |
| 35 | def validate(ifc): |
| 36 | errors = [] |
| 37 | logger = ifcopenshell.validate.json_logger() |
| 38 | try: |
| 39 | ifcopenshell.validate.validate(ifc, logger) |
| 40 | if logger.statements: |
| 41 | for statement in logger.statements: |
| 42 | errors.append(f"{json.dumps(statement, default=str)}") |
| 43 | except RuntimeError as error: |
| 44 | assert False, str(error) |
| 45 | |
| 46 | |
| 47 | def assert_guid(ifc, guid): |