my question is about the best workflow in V8i, but I think the same can be asked for CE implementation, so I included both versions in the subject.
I have DGN file with references (often) and more models in the main DGN file (sometimes). Some elements in models contain data in custom format, partially depending on extrernal data sources. I need to publish DGN file to i-model package including the custom data. During the conversion, the original files have to remain unchanged.
What is a recommended workflow and best practice? I do not ask how to convert custom data to "i-model supported format", this part is implemented already, I am able to create EC schema(s) based on custom data structures and to attach EC data to elements, and it works fine. My question is about how to manipulate with elements, models and references.
One alternative I have thoguht about is to make a copy of the whole structure, do necessary data conversion, and to use i-model API (imodelPublisher class etc.) to publish model(s) with references.
I read i-model Primer in MicroStation Programmer Guide, but I think I do not understand well enough the description when work DGN file should be used and how references are supported in the described workflow. When I simplify the workflow described in the guide, it's:
What I miss in the description is when to rewert changes (I guess when i-model publishing is finished) and also (more important) when and how to modify more models in opened DGN file and attached references.
I will need to investigate a few options and if needed I may need to check with the MicroStation iModel publishing developer with a proposed workflow/solution to this workflow.
it would be great.
I think to copy everything to temp structure > convert > publish temp files > delete everything will work fine, but there are also some not so nice features:
... and it seems MicroStation uses a different approach, because references are published at background, but it's not clear whether the process can be hooked using API.
Labyrinth Technology | dev.notes() | cad.point
We do have (4) imodel publishing related examples in the MicroStation CONNECT SDK, though I presume have seen/reviewed these already but if not please take a quick look:
Most recent examples
I will keep you posted and thank you for mentioning ProjectWise likely to be involved,
Robert Hook said:We do have (4) imodel publishing related examples in the MicroStation CONNECT SDK, though I presume have seen/reviewed these already
Well, I did, but it was some time ago, so I will do it again ;-)
My two comments are that for now I have to implement it on V8i, because API to obtain external has not been ported to CE yet. But it will be, so there is also option to use some simpler (like copy everything out) in V8i and to do it better and more integrated in CE later.
What I remember (but it's something I will have to check again) the examples do not demonstrate how to work with reference attachments including modificaiton of existing elements with new data.
Like you have mentioned while publishing the file MS traverse through all the reference attachments and publish them all. So currently there is no API which you can use to publish reference individually. But I would like to understand the use case where you need an API to publish the references.
But if you want package some document with iModel then we have the APIs for that and that is EmbedDocumentsInPackage (WString documentName) which you can use to embed the document.