How to place shared cell in a library?

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

Parents
  • 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: 

    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? 

    Regards,

    Bartosz Perepeczo

  • I know I can view cells, but how to edit them?

    Use MicroStation's drop tool.  You can drop a shared cell to a normal cell, or to its graphic components.

    MicroStation Help: Drop Element

    You can create an anonymous normal cell using the Group command.  You can assign a name to that anonymous cell using the Element Properties dialog.

    So, your workflow might be...

    1. Select a shared cell instance that you want to edit
    2. Use Drop Element to create a set of elements
    3. Edit those elements
    4. Use the Group command to create an anonymous normal cell
    5. Open the Properties dialog
    6. Edit the cell name

     
    Regards, Jon Summers
    LA Solutions

  • 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.

    Regards,

    Bartosz Perepeczo

  • Jon,

    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.

    Regards,

    Bartosz Perepeczo

  • 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.

    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.

  • 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.  

    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.

     
    Regards, Jon Summers
    LA Solutions

Reply Children