Closed MYDJH closed 5 months ago
Sounds like the same or similar issue as #6332. @MichaelBelousov, you indicated you would investigate further - did you find anything?
@MYDJH you can expect better results by synchronizing multiple input files (.rvt, .dgn, etc) to a single iModel than by trying to merge them after converting each to a separate iModel.
Yes @pmconne is right, this is very likely a duplicate of #6332.
The investigation yielded that while we work on making merging of dynamic schemas more automated, you must manually merge the two divergent dynamic schemas and then remap all instances to the new one during the merge transformation, using the Transformer's JavaScript API. Please let me know if you would like me elaborate.
I do recommend to try what @pmconne mentioned, where possible synchronize the original source into one iModel.
If you could provide a detailed explanation, I would greatly appreciate it. @MichaelBelousov
Sounds like the same or similar issue as #6332. @MichaelBelousov, you indicated you would investigate further - did you find anything?
@MYDJH you can expect better results by synchronizing multiple input files (.rvt, .dgn, etc) to a single iModel than by trying to merge them after converting each to a separate iModel.
I didn't quite understand your meaning. Could you please provide a detailed explanation incorporating itwin's API or pseudocode? I truly appreciate your advice and response
@MYDJH please consider pmconne's approach first. It really is usually much easier, so before I do an in-depth explanation of manual schema merging which can be bug-prone and tedius, please consider that.
Since you said you don't understand his meaning, I'll try to explain it, but without code because it shouldn't be necessary.
How are you connecting/synchronizing source files (.dgn
,.rvt
) into these two original iModels that you want to merge?
Can you create a new iModel and connect the same source files into the new iModel, instead of a programmatic post-connection merge of two separate iModels?
How to do this would be based on how you created the original iModels.
@MichaelBelousov "Thank you very much for your response. I have browsed through the official website of itwin.js and some test demos, but I still haven't figured out how to implement it. As you mentioned last time, @pmconne's approach involves creating an empty iModel and then obtaining the SnapshotDb of the iModel I want to merge. However, I didn't understand how to achieve synchronization for iModels. In this field, my understanding is limited. If you have the time, I hope you can provide more hints or insights. Looking forward to your next response."
Using the iTwin Snapshot lightweight conversion tool, I generated multiple files into a single model (IModel). However, I've noticed that I need to switch to view the corresponding model views. Is there a way to structurally merge them so that they can all be displayed in a single view?Thank you for viewing。
The desktop starter app you're using looks pretty bare-bones. Most viewer applications include a tree view that allows you to turn on and off the visibility of individual models. Alternatively, you can change the visibility programmatically using the view's model selector. You can create a view that displays all the models using ViewCreator3d.
"Thank you very much for your help."@pmconne
"I encountered some issues while using the transformer to merge two iModels. When executing the method, I encountered error messages. I tried several approaches to merge, but all of them failed."
Attempting solutions 1:
Error Message:Error importing schema; Error Message:attempt to clone with unknown class;
Attempting solutions 2:
The actual error location is reported when executing the transformer. processAll() method
Error Message:Error Error: attempt to clone with unknown class
"I sincerely hope for your assistance in analyzing whether the problem resides within my code or the environment. Additionally, any insights or suggestions you may have for an improved implementation plan would be greatly appreciated. Thank you for your consideration and help."
The file I want to merge is. mergeFile.zip