Title: [ifcopenshell-python] file.remove() on rooted elem without globalid gives error message · Issue #2796 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: [ifcopenshell-python] file.remove() on rooted elem without globalid gives error message · Issue #2796 · IfcOpenShell/IfcOpenShell
X Title: [ifcopenshell-python] file.remove() on rooted elem without globalid gives error message · Issue #2796 · IfcOpenShell/IfcOpenShell
Description: to reproduce use this code: import ifcopenshell ifc = ifcopenshell.file(schema='IFC4') wall = ifc.createIfcWall() print("Wall is here") print(wall) print("Wall is deleted") ifc.remove(wall) print("Wall should be deleted") print(wall) pri...
Open Graph Description: to reproduce use this code: import ifcopenshell ifc = ifcopenshell.file(schema='IFC4') wall = ifc.createIfcWall() print("Wall is here") print(wall) print("Wall is deleted") ifc.remove(wall) print("...
X Description: to reproduce use this code: import ifcopenshell ifc = ifcopenshell.file(schema='IFC4') wall = ifc.createIfcWall() print("Wall is here") print(wall) print("Wall is deleted&quo...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/2796
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ifcopenshell-python] file.remove() on rooted elem without globalid gives error message","articleBody":"to reproduce use this code:\r\n\r\n```python\r\nimport ifcopenshell\r\n\r\nifc = ifcopenshell.file(schema='IFC4')\r\n\r\nwall = ifc.createIfcWall()\r\n\r\nprint(\"Wall is here\")\r\nprint(wall)\r\n\r\n\r\nprint(\"Wall is deleted\")\r\nifc.remove(wall)\r\n\r\nprint(\"Wall should be deleted\")\r\nprint(wall)\r\nprint(\"Is it?\")\r\n\r\n```\r\n\r\nand the error traceback was:\r\n\r\n```shell\r\nWall is here\r\n#1=IfcWall($,$,$,$,$,$,$,$,$)\r\nWall is deleted\r\nTraceback (most recent call last):\r\n File \"C:\\Users\\martin\\remove_test\\remove_test.py\", line 19, in \u003cmodule>\r\n ifc.remove(wall)\r\n File \"C:\\Users\\martin\\Documents\\miniforge\\envs\\ifcopenshell\\Lib\\site-packages\\ifcopenshell\\file.py\", line 428, in remove\r\n return self.wrapped_data.remove(inst.wrapped_data)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\martin\\Documents\\miniforge\\envs\\ifcopenshell\\Lib\\site-packages\\ifcopenshell\\ifcopenshell_wrapper.py\", line 4497, in remove\r\n return _ifcopenshell_wrapper.file_remove(self, entity)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nRuntimeError: Invalid cast\r\n\r\n```\r\n\r\ni found the remove method in the doc, see https://blenderbim.org/docs-python/ifcopenshell-python/hello_world.html","author":{"url":"https://github.com/Martin15135215","@type":"Person","name":"Martin15135215"},"datePublished":"2023-02-21T09:27:44Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/2796"}
| 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:5129fd2c-22dc-02ba-06cd-272da3c1301d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B458:4AE08:2B1D56:39F5CF:6B049BA0 |
| html-safe-nonce | a6979822156736d7972a00b919bb9d784bf4087a7fa9f2f552252beec405d592 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDU4OjRBRTA4OjJCMUQ1NjozOUY1Q0Y6NkIwNDlCQTAiLCJ2aXNpdG9yX2lkIjoiOTExMTc5NTU0NDI4MzcxNjUxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d96af6f57009d543d7c1866fa565a4fe1bff75de5d6f036d74921023e02c3c30 |
| hovercard-subject-tag | issue:1593129376 |
| 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/2796/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5197dd2da662f274a4fb7339d83a5aa8dc82a9b7e98bac516b3085c3d2f6339d/IfcOpenShell/IfcOpenShell/issues/2796 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5197dd2da662f274a4fb7339d83a5aa8dc82a9b7e98bac516b3085c3d2f6339d/IfcOpenShell/IfcOpenShell/issues/2796 |
| og:image:alt | to reproduce use this code: import ifcopenshell ifc = ifcopenshell.file(schema='IFC4') wall = ifc.createIfcWall() print("Wall is here") print(wall) print("Wall is deleted") ifc.remove(wall) print("... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Martin15135215 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| 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 | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| 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