Title: IFC4X3 not working in the Python API · Issue #3126 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: IFC4X3 not working in the Python API · Issue #3126 · IfcOpenShell/IfcOpenShell
X Title: IFC4X3 not working in the Python API · Issue #3126 · IfcOpenShell/IfcOpenShell
Description: By running the following snippet: import ifcopenshell.api def create_simple_IFC(version): file = ifcopenshell.api.run('project.create_file', version=version) project = ifcopenshell.api.run('root.create_entity', file, ifc_class='IfcProjec...
Open Graph Description: By running the following snippet: import ifcopenshell.api def create_simple_IFC(version): file = ifcopenshell.api.run('project.create_file', version=version) project = ifcopenshell.api.run('root.cr...
X Description: By running the following snippet: import ifcopenshell.api def create_simple_IFC(version): file = ifcopenshell.api.run('project.create_file', version=version) project = ifcopenshell.api.run(...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/3126
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IFC4X3 not working in the Python API","articleBody":"By running the following snippet:\r\n\r\n```python\r\nimport ifcopenshell.api\r\n\r\n\r\ndef create_simple_IFC(version):\r\n file = ifcopenshell.api.run('project.create_file', version=version)\r\n project = ifcopenshell.api.run('root.create_entity', file, ifc_class='IfcProject')\r\n site = ifcopenshell.api.run('root.create_entity', file, ifc_class='IfcSite')\r\n ifcopenshell.api.run('aggregate.assign_object', file, product=site, relating_object=project)\r\n\r\n pset_site = ifcopenshell.api.run('pset.add_pset', file, product=site, name='Pset_SiteCommon')\r\n ifcopenshell.api.run('pset.edit_pset', file, pset=pset_site, properties={'TotalArea': 400.})\r\n return file\r\n\r\n\r\nassert create_simple_IFC('IFC4')\r\nassert create_simple_IFC('IFC4X3')\r\nassert create_simple_IFC('IFC4X3_TC1')\r\nassert create_simple_IFC('IFC4X3_ADD1')\r\n```\r\n\r\nAn error is returned for the last two cases:\r\n```\r\nFile \"./ifcopenshell/util/pset.py\", line 49, in __init__\r\n path = str(folder_path.joinpath(\"schema\", self.templates_path[schema]))\r\n ~~~~~~~~~~~~~~~~~~~^^^^^^^^\r\nKeyError: 'IFC4X3_TC1'\r\n```\r\n\r\nMoreover, in version='IFC4X3', although this simple example works, we're using deprecated IFC4.3.0.0 rc2, which might not be what intended, and leads to [strange validation issues](https://github.com/IfcOpenShell/IfcOpenShell/issues/2685#issuecomment-1519166560).\r\n\r\nI believe that even before TC1 becomes ISO, version='IFC4X3' should default to it. The other alternative may be to change equalities to `str.startswith` within the API... but I believe virtually 100% of people creating an 'IFC4X3' version will be looking for the new infra Schema, and not the particular deprecated version IFC4.3.0.0 rc2.\r\n\r\n","author":{"url":"https://github.com/cvillagrasa","@type":"Person","name":"cvillagrasa"},"datePublished":"2023-05-09T10:38:23Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/3126"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b45facc0-5ec2-96c6-8f1d-6ee56deef93f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90AE:2DF8CF:4C67FF:650CB2:6B04BE41 |
| html-safe-nonce | 8aca942769a01c0bcfa2154156aa82a5b39bbca22a47e66c474969a41ae1f4c4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEFFOjJERjhDRjo0QzY3RkY6NjUwQ0IyOjZCMDRCRTQxIiwidmlzaXRvcl9pZCI6IjUyODAyODg5ODk4MjkzNjEyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2d43fb0b5f6558aea828f48e27d178252f4a2e5dce7710d0f8574e0c79221123 |
| hovercard-subject-tag | issue:1701824102 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/3126/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4fe17f6886cba457bdd33b7b370762fde7c62d6e8e347fcfefc7119b2b92daed/IfcOpenShell/IfcOpenShell/issues/3126 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4fe17f6886cba457bdd33b7b370762fde7c62d6e8e347fcfefc7119b2b92daed/IfcOpenShell/IfcOpenShell/issues/3126 |
| og:image:alt | By running the following snippet: import ifcopenshell.api def create_simple_IFC(version): file = ifcopenshell.api.run('project.create_file', version=version) project = ifcopenshell.api.run('root.cr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cvillagrasa |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width