Title: addRelatedObject
Open Graph Title: addRelatedObject
X Title: addRelatedObject
Description: Bug Description The attached example program builds and saves a simple model that adds IfcBeam to IfcBridgePart with file.addRelatedObject
Open Graph Description: Bug Description The attached example program builds and saves a simple model that adds IfcBeam to IfcBridgePart with file.addRelatedObject
X Description: Bug Description The attached example program builds and saves a simple model that adds IfcBeam to IfcBridgePart with file.addRelatedObject<Ifc4x3_add2::IfcRelContainedInSpatialStructure>(whol...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/7264
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"addRelatedObject\u003cIfcRelContainedInSpatialStructure> error - possibly related to rocksdb","articleBody":"### Bug Description\n\nThe attached example program builds and saves a simple model that adds IfcBeam to IfcBridgePart with `file.addRelatedObject\u003cIfc4x3_add2::IfcRelContainedInSpatialStructure>(whole, part);`\n\nI'm experiencing two problems.\n\n1. I create two IfcBeam entities, but only one of them is saved to the output file. I suspect the problem has to do with the next problem.\n2. When adding beams to the superstructure bridge part with `file.addRelatedObject\u003cIfc4x3_add2::IfcRelContainedInSpatialStructure>(superstructure, beam1);` the following error is output to the console `[Error] [2025-10-19 11:26:49] Type held at index 0 is class Blank and not class std::basic_string\u003cchar,struct std::char_traits\u003cchar>,class std::allocator\u003cchar> >` The error occurs from https://github.com/IfcOpenShell/IfcOpenShell/blob/f05b0d946d72a9abfde69bcd8ed08f80a33de149/src/ifcparse/IfcHierarchyHelper.h#L474\n\n\nI am 99% sure that `addRelatedObject` worked before commit ce4407ff and maybe even commit c935b2fc. There were substantial changes to `addRelatedObject` in commit 9d9e9ed4, which has to do with rocksdb.\n\n### Attachments\n\n[Test.zip](https://github.com/user-attachments/files/22991926/Test.zip)\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/RickBrice","@type":"Person","name":"RickBrice"},"datePublished":"2025-10-19T18:38:37Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/7264"}
| 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:cfe514b7-a8c2-3cb3-6eeb-9995a176cbd1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B98:34B9D4:884183:C0DE13:6B047749 |
| html-safe-nonce | e0469ab341caf9c31235a98618cd2761295c18814c7cc02ea855713595760ef3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Qjk4OjM0QjlENDo4ODQxODM6QzBERTEzOjZCMDQ3NzQ5IiwidmlzaXRvcl9pZCI6IjI5NjU2NTk1NzM3NjUzMDYxODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e9a3b2987f920d635ae5721e325347d62078171d1f660927b605f11dc48ab120 |
| hovercard-subject-tag | issue:3530330563 |
| 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/7264/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9404ebf08ce66d1d0f2989856683653371c12ed9bbc0f05e585f689b5325df07/IfcOpenShell/IfcOpenShell/issues/7264 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9404ebf08ce66d1d0f2989856683653371c12ed9bbc0f05e585f689b5325df07/IfcOpenShell/IfcOpenShell/issues/7264 |
| og:image:alt | Bug Description The attached example program builds and saves a simple model that adds IfcBeam to IfcBridgePart with file.addRelatedObject |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RickBrice |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| 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 | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| 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