Hello,
I have the following situation:
I have received DWG file and it has various shared cells in the model. I obviously don't have corresponding .cel file with the definitions and I know I can export them all to separate file but it creates hundreds of models which have nested models (definitions) inside with even more nested definitions and it's too messy to work with. What I would like to do is to attach a blank library and save definitions I need to edit in that library one by one so I can edit shared cell and update in the model and move to the next one. Is that possible somehow without taking this shared cell, resetting rotation/scale setting up the origin, dropping the instance, creating a new definition for editing and cleaning up the file? It seems very complicated since that definition is already in the file... I am happy if it could be done programmatically even! Ideally, I would love to be able to edit it in place but that doesn't seem to be possible?
Also related to this, what would happen if I do the following:
I have shared cell (A) inside multiple other shared cells (B, C, D and so on) in my file and it is also all saved in the library. Then I open the library and edit shared cell (A) and save the library. Now I understand that all the shared cells in the library (B, C, D and so on) contain updated definition as the library has basically nested structure with nested models, right? So if I now open my main file and reload the library and decide to update those cells (B, C, D and so on) from the library, am I safe to assume that all the instances will contain an updated version of the cell (A)??
Regards,
Bartosz Perepeczo
Cisco said:What I would like to do is to attach a blank library and save definitions. I am happy if it could be done programmatically
I think a programmatic solution is your sole recourse. What you're asking is to create a new DGN cell library that will contain nested cell definitions, using existing DGN shared cell definitions as the source data. It's an unusual request because of your workflow: the original DWG cells are not available to you. If they were available, your life would be a lot simpler.
Regards, Jon Summers LA Solutions
Jon,
Actually something you said drew my attention now:
Jon Summers said:It's an unusual request because of your workflow: the original DWG cells are not available to you.
Why is it unusual? Every time DGN file is sent (without accompanying .cel file) to someone else they are in exactly the same situation as I am now if I'm correct? Am I doing something fundamentally wrong? Does it matter if the original file was DWG? If I save it as DGN it shouldn't change much in that regard?
Gerd,
Thank you for an attempt to help. I do not have a library with cell definitions. The question is not about how to edit a cell in a library it is how to place the cell in the library so it can be edited.
This creates a new cell that has no link to other shared cells. It still needs to be placed in a library, has the scale, rotation and origin manually specified and then updated from the library.
Going back to the original question(s) can it be confirmed that:
1. There is no way to put shared cell definition in a library directly from DGN file other than doing global export of all shared cells.
2. There is no way of editing shared cell definition in DGN file without exporting it to the library first?
Just so I can close this discussion without working solution.
Cisco said:1. There is no way to put shared cell definition in a library directly from DGN file other than doing global export of all shared cells.
Correct. There is no such thing as a "shared cell definition". A cell is always a cell. It's at placement time that you have an option to place that cell as a "shared cell instance" vs. a "normal" cell.
Cisco said:2. There is no way of editing shared cell definition in DGN file without exporting it to the library first?
Correct. You cannot edit something that doesn't exist.
Bruce Reeves SRNS said:There is no such thing as a "shared cell definition"
A shared cell definition element is stored invisibly in a DGN file. It's used when you create a shared cell instance in a DGN model that is in the same file as its definition.
A user has only indirect contact with a shared cell definition. APIs are available to define and get a shared cell definition.
Bruce Reeves SRNS said:It's at placement time that you have an option to place that cell as a "shared cell instance" vs. a "normal" cell
When you place that shared cell instance for the first time, MicroStation creates the shared cell definition element in the target DGN file.
Hi Cisco, this is exactly what is described in the wiki link.