Skip to content

Ignore tail remarks in the express schema parser#1

Merged
aothms merged 1 commit into
IfcOpenShell:masterfrom
aothms:master
Aug 13, 2015
Merged

Ignore tail remarks in the express schema parser#1
aothms merged 1 commit into
IfcOpenShell:masterfrom
aothms:master

Conversation

@aothms

@aothms aothms commented Aug 13, 2015

Copy link
Copy Markdown
Member

No description provided.

aothms added a commit that referenced this pull request Aug 13, 2015
Ignore tail remarks in the express schema parser
@aothms aothms merged commit 8406c52 into IfcOpenShell:master Aug 13, 2015
@fbosche fbosche mentioned this pull request May 31, 2016
aothms pushed a commit to aothms/IfcOpenShell that referenced this pull request Jun 5, 2016
aothms pushed a commit that referenced this pull request Jan 23, 2019
Merging back Thomas' latest changes
Moult pushed a commit that referenced this pull request Dec 19, 2020
Apply changes done under Engisis to the IFCRail fork
aothms pushed a commit that referenced this pull request Jul 10, 2021
aothms pushed a commit that referenced this pull request Sep 14, 2022
Andrej730 added a commit that referenced this pull request May 19, 2023
Previously there was an error if you remove all drawings:
```
Traceback (most recent call last):
  File "\addons\blenderbim\bim\module\drawing\ui.py", line 182, in draw
    DrawingsData.load()
  File "\addons\blenderbim\bim\module\drawing\data.py", line 106, in load
    "active_drawing_pset_data": cls.active_drawing_pset_data(),
  File "\addons\blenderbim\bim\module\drawing\data.py", line 134, in active_drawing_pset_data
    drawing = ifc_file.by_id(bpy.context.scene.DocProperties.active_drawing_id)
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 326, in by_id
    return self[id]
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 314, in __getitem__
    return entity_instance(self.wrapped_data.by_id(key), self)
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 4517, in by_id
    return _ifcopenshell_wrapper.file_by_id(self, id)
RuntimeError: Instance #1 077 not found
```
Moult added a commit that referenced this pull request Jul 2, 2023
…-Brickschema

Interface to interact with brickschema PR #1
Andrej730 added a commit that referenced this pull request May 13, 2024
After ab5ea4c it was always throwing wrong singature errors like below even if TypeError was caused by some internal issues inside API - it was adding couple extra steps to traceback making errors more noisy.

TypeError: Incorrect function arguments provided for library.edit_library
attribute 'VersionDate' for entity 'IFC2X3.IfcLibraryInformation' is expecting value of type 'ENTITY INSTANCE', got 'str'.. You specified args (<ifcopenshell.file.file object at 0x0000027EB8E6BCD0>,) and settings {'library': #1=IfcLibraryInformation('Name','Version',$,$,$), 'attributes': {'Name': 'Name', 'Version': 'Version', 'VersionDate': 'VersionDate', 'Location': 'Location', 'Description': 'Description'}}
E
Correct signature is (file: ifcopenshell.file.file, library: ifcopenshell.entity_instance.entity_instance, attributes: dict[str, typing.Any]) -> None
See help(ifcopenshell.api.library.edit_library) for documentation.
red1oon added a commit to red1oon/IfcOpenShell that referenced this pull request Nov 9, 2025
…eets

This commit adds a complete Bill of Quantities (BOQ) export system for the
federation module with three critical fixes:

## Critical Fixes Applied

### Fix IfcOpenShell#1: Correct Quantity Calculation (Strategy A)
- **Problem**: BOQ was summing ALL quantity types together (Length + Area + Volume)
  resulting in nonsensical mixed units and costs in billions
- **Solution**: Use PRIMARY quantity only per element type:
  - IfcWall → GrossSideArea (M2) only, not mixed with NetVolume
  - IfcBeam → Length (M) only, not mixed with Volume
  - IfcDoor → Count (EA)
- **Result**: Realistic costs instead of billions

### Fix IfcOpenShell#2: Friendly IFC Element Descriptions
- **Problem**: BOQ showed technical names like "IfcWall" instead of readable text
- **Solution**: Created ifc_labels table in database with 28 friendly names
- **Examples**:
  - IfcWall → "Blockwork Wall (150mm)"
  - IfcBeam → "Structural Steel I-Beam"
  - IfcDuct → "Galvanized Steel Ductwork"

### Fix IfcOpenShell#3: Reference Sheets with Excel Cell Formulas
- **Problem**: Users couldn't see or edit unit costs
- **Solution**: Added 3 reference sheets with editable rates:
  - 📋 Material Rates (25+ materials)
  - 👷 Labor Rates (8 trades)
  - 🚜 Equipment Rates (7+ equipment types)
- **Benefit**: Change rate in ONE place → all BOQ sheets recalculate automatically

## New Files Added

1. **comprehensive_boq_export_fixed.py** (658 lines)
   - Fixed BOQ exporter with Strategy A quantity logic
   - Dual-schema support (aggregated + enhanced databases)
   - Creates 13-sheet Excel: Cover + Dashboard + 3 Reference + 8 BOQ sheets
   - Executive Dashboard with Pie & Bar charts

2. **create_ifc_labels_table.py** (280 lines)
   - Creates ifc_labels table with 28 IFC class descriptions
   - Maps primary quantity type per element (Length, Area, Count, etc.)
   - Usage: python3 create_ifc_labels_table.py <database_path>

3. **BOQ_System_User_Guide_For_Accountants.md** (1040 lines)
   - Complete user guide for accountants & quantity surveyors
   - Appendix A: Cost calculation reference tables (390 lines)
   - Shows where to edit rates, regional adjustments, inflation factors

## Features

- ✅ Primary quantity logic prevents mixed unit aggregation
- ✅ IFC labels integration with graceful fallback
- ✅ Excel cell formulas link BOQ to reference sheets
- ✅ Executive Dashboard with charts (Pie + Bar)
- ✅ Malaysian construction standards (CIDB N3C, BCISM 2024)
- ✅ Dual database schema support (auto-detection)
- ✅ 8 disciplines: ACMV, ARC, CW, ELEC, FP, LPG, SP, STR

## Technical Details

- Database tables: elements_meta, element_properties, simple_qto, ifc_labels
- Query optimization for both aggregated and enhanced schemas
- openpyxl charts: PieChart, BarChart with DataBar formatting
- Cost sources: CIDB N3C 2024-Q4, BCISM Cost Book, MBAM-CIDB Survey 2024

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@maxfb87 maxfb87 mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant