Title: Documentation Outdated · Issue #3841 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Documentation Outdated · Issue #3841 · IfcOpenShell/IfcOpenShell
X Title: Documentation Outdated · Issue #3841 · IfcOpenShell/IfcOpenShell
Description: I'm testing the Selector Util that you provided and testing this exact example: `import ifcopenshell import ifcopenshell.util.selector model = ifcopenshell.open("model.ifc") Get all concrete walls and slabs. ifcopenshell.util.selector.fi...
Open Graph Description: I'm testing the Selector Util that you provided and testing this exact example: `import ifcopenshell import ifcopenshell.util.selector model = ifcopenshell.open("model.ifc") Get all concrete walls ...
X Description: I'm testing the Selector Util that you provided and testing this exact example: `import ifcopenshell import ifcopenshell.util.selector model = ifcopenshell.open("model.ifc") Get all c...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/3841
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Documentation Outdated","articleBody":"I'm testing the Selector Util that you provided and testing this exact example: \r\n`import ifcopenshell\r\nimport ifcopenshell.util.selector\r\n\r\nmodel = ifcopenshell.open(\"model.ifc\")\r\n# Get all concrete walls and slabs.\r\nifcopenshell.util.selector.filter_elements(model, \"IfcWall, IfcSlab, material=concrete\")`\r\n\r\nThrows this error: \r\n`Traceback (most recent call last):\r\n File \"/home/santi/IfcSemanticInfo/materials.py\", line 6, in \u003cmodule>\r\n ifcopenshell.util.selector.filter_elements(model, \"IfcWall, IfcSlab, material=concrete\")\r\nAttributeError: module 'ifcopenshell.util.selector' has no attribute 'filter_elements'`\r\n\r\nHowever, thanks to my IDE it tells me tring to use ifcopenshell.util.selector.Selector which is a class defined in that module that got that same exact method, but using a query as provided on the example still doesn't work as intended.\r\nThe error it throws is the next one:\r\n`Traceback (most recent call last):\r\n File \"/home/santi/IfcSemanticInfo/materials.py\", line 9, in \u003cmodule>\r\n sel.filter_elements(model, model.by_type(\"IfcElement\"), \"material=concrete\")\r\n File \"/home/santi/.local/lib/python3.10/site-packages/ifcopenshell/util/selector.py\", line 140, in filter_elements\r\n key = filter_rule.children[0].children[0]\r\nAttributeError: 'str' object has no attribute 'children'`\r\n\r\nCould you provide further instructions on how to use the selector correctly?","author":{"url":"https://github.com/smarnav2904","@type":"Person","name":"smarnav2904"},"datePublished":"2023-10-03T12:38:03Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/3841"}
| 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:29f1d939-6df5-33ea-d89f-11ca499ffa47 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E488:1DFD99:5AE06:78C27:6B04AEAF |
| html-safe-nonce | 6106cfcb0b9cdaace06c3c9357b8598386fcd0f7a40d3550944ecf8bcf4617f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDg4OjFERkQ5OTo1QUUwNjo3OEMyNzo2QjA0QUVBRiIsInZpc2l0b3JfaWQiOiI0OTY2MTI3NjEyMjA5NzA0NjIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cf601b3d60bc00d6edf54e71a1469a33acb07f596aedb23a84144fcafb5ae904 |
| hovercard-subject-tag | issue:1924058090 |
| 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/3841/issue_layout |
| twitter:image | https://opengraph.githubassets.com/98a39040f4baa097f44ee27403b6564802bbe6f13c852ca9236bb12dbb7222cb/IfcOpenShell/IfcOpenShell/issues/3841 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/98a39040f4baa097f44ee27403b6564802bbe6f13c852ca9236bb12dbb7222cb/IfcOpenShell/IfcOpenShell/issues/3841 |
| og:image:alt | I'm testing the Selector Util that you provided and testing this exact example: `import ifcopenshell import ifcopenshell.util.selector model = ifcopenshell.open("model.ifc") Get all concrete walls ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | smarnav2904 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| 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 | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| 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