Best approach for copying geometry from one iModel to another. #114
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
As a performance optimization, we don't load geometry unless it is specifically requested. If you look at the documentation for You probably want https://www.imodeljs.org/reference/imodeljs-common/entities/elementloadprops/ There are ways of cloning entire elements between iModels, but your code should work with the above changes. See this page if you want to learn more about cloning: https://www.imodeljs.org/learning/backend/imodeltransformation/ Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
You will also want to set |
Beta Was this translation helpful? Give feedback.
-
The ElementLoadProps with wantGeometry and wantBRepData set to true resolved the undefined problem, but still not getting the geometry written to target iModel. I parsed the geom to jsonProperties, for troubleshooting, and below is what is being captured. this looks to me to be a valid GeometryStreamProps, but I am guessing that all the referenced ECInstanceIds are source ids and I will have to find and recreate each element? If i switch over to the IModelTransformer will this be handled automatically? |
Beta Was this translation helpful? Give feedback.
The ElementLoadProps with wantGeometry and wantBRepData set to true resolved the undefined problem, but still not getting the geometry written to target iModel. I parsed the geom to jsonProperties, for troubleshooting, and below is what is being captured.
this looks to me to be a valid GeometryStreamProps, but I am guessing that all the referenced ECInstanceIds are source ids and I will have to find and recreate each element? If i switch over to the IModelTransformer will this be handled automatically?