Convert DWG blocks to DGB Cell Library

Is there a way to convert a Civil3D DWG file with multiple blocks all in one model to a dgn cell library with a separate model from each block? I'm looking for a way to convert a DWG block file to dgn cell library.

  • Instant cell library

    here was my workflow

    I took a bunch of dwg files and translated them to DGN. rename levels as needed with cvs file

    Then I used batch process and renames all the models "model" to the dgn file name

    using this in a txt file for batch process

    $ model rename default $(basename(_DGNFILE))

    Since they were once dwg files the keyin was ...

    $ model rename MODEL $(basename(_DGNFILE))

    Open the Dgn file and select all the dgn files and drag and drop them into the Models dialog


    In an explorer window, multi-select the source DGN files. Then drag-drop the selection on the "Models" dialog of the destination DGN file. This will copy all models, including drawing and sheet.

    Kirk

    I Wish Cadland was Reality

  • Awesome! Glad to hear it!

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

  • Thank you.  I got it to work using:

    $ export cells shared "F:\Home\PW\CAD\...Insert rest of path here...\$(basename(_DGNFILE)).cel"

    This should work well since the output path of my .cel files is the same for all dwg files that will be processed.

    The trick I missed was the $ at the beginning of the command line, which is explained in the link you included.

    It worked on a single file as a key-in, so it should work as a Batch Process Command File. 

    Answer Verified By: Josh M 

  • You might  also be able to use the keyin 

    expand set MS_DESIGNSEED = fullpath and filename for your desired seed

    before you use the export... keyin.
    It could be another configuration variable - I pulled that from memory and it's probably wrong...But you may be able t find out which variable you want by looking at your configuration variables and seeing what they use for cell seeds, if there is such a thing.

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

  • I haven't checked it (not in MicroStation today) but you might be able to make use of the $(basename(_DGNFILE)) as shown here as part of your Export...keyin. As in

    export cells shared c:\Cells\$(basename(_DGNFILE)).cel

    Again, I haven't tried it. You can try the keyin on one file to see if it works. If it does, that would be your keyin for your batch process.

    MaryB

    Power GeoPak 08.11.09.918
    Power InRoads 08.11.09.918
    OpenRoads Designer 2021 R2

        

    Answer Verified By: Josh M