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.
KeyIn:
export cells shared c:\folder\filename.cel
Ivo Blaauw= = = = = = = = = = = = =Look what the CAD dragged in...
Answer Verified By: Josh M
Thank you. I had a chance to try your suggestion. It works, but I have a couple questions:
OK, I think I have it.
You want to export the shared cells out of a DWG file into a cell library that will have the name of the DWG file - without having to manually name it, so that you can run that as a batch process. That way, each DWG will generate its own cell library with the same name, and you can get them all done in one pass?
Hmmm. I'll try to look into that. I'm not the most experienced with batches and scripting, so hopefully someone with more knowledge will be along shortly.
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2
Yes. That's exactly what I am trying to do. Thanks for looking.
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.
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.
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.
Awesome! Glad to hear it!