Hello
I'm looking for a way to change the first models name to the same as the DGN-file's name when creating a new file. How do I do this?
The background:
We are working with one floor or one sheet in separate files. Therefore I'm trying to get going with the project explorer. But since every drawing file's name is drawing, and every sheet name is layout 1 it's not very easy to browse the project explorer. (See the picture.)
So, it seems I need the change the models name in order to use the project explorer without having the scroll sideways and watch the full path to find the right file.
I came across this article when looking for the answer, rename model keyin, but the problem there is I want all my future models the have the correct models name from scratch. I don't want to run the macro every time I've created a new file.
Really hope you can help me
Robert
Hi Robert,
if you want to change the default model name for future files, you should change it in used seed file(s).
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi
Thank you for your reply. I'm with you that far. But then ...?
So for instance, if my DGN-file is named A-01, I want the model named A-01 as well. But if I name the DGN-file B-02 I want the model to be named B-02.
There may be more advanced tools in Connect, but that sounds like it would take a custom prgramming routine (MDL or VBA) to accomplish that. I'll be watching, because I've been thinking about this very thing.
MaryB
Power GeoPak 08.11.09.918Power InRoads 08.11.09.918OpenRoads Designer 2021 R2
I agree with Mary a code will be required to accomplish your requirement. There is no way how to "link" file name and model name, so an application, that will start automatically with MicroStation and will check every opened file has to be developed.
Ok, thanks Jan. So basically that means the project explorer is worthless when your working with one model per file, since its so hard to see the names and so on. (unless you develop your on code).
For a simple view to a the list of all the files in the current folder I use a LinkSet with the config variable $(_dgndir)*.dgn without any filter.
Hi. Yeah, that seems to work really good with the names. The problem there is that I have sheets in one folder and drawings in another.
So if I have drawings in folder A and drawings in folder B. Both of them are located in folder 1. So if I'm in a file in the folder A, is there a way to point to the other folder (B) without having to type the whole path? Just like the $(_dgndir)*.dgn ?
So, got it now. Not very familiar with configurations, finally figured out how to point the the correct folder, and by not using any filter get rid of the modells name and instead show the files name. So if anyone else has the same problem, I wrote:
$(_USTN_PROJECTDATA)modell\*.dgn
Instead of Gerds $(_dgndir)*.dgn where modell is the folder I keep my drawings in.
you can make a custom tool which creates creates new files
it runs a macro or keyin script which selects the create new file command, assigns the seed as per normal asks for file name but then opens the file and runs the rename model keyin below to use the drg file name to rename the default model to your file name
via the keyin
$ model rename default $(basename(_DGNFILE))
.. then put the custom tool in the dgn lib and everyone will have access.. but get your cad manager to help and make everyone aware of the new feature....
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me