I have a file called active.dgn
to which is attached refile.dgn
now I have a level libray attached through the dgnlib.
I want a key in or script or vba to do what I can do by hand in the level manager, but typically the ref file is attached to lots of drawings no just active.dgn
now this is what I can do by hand in each active drg
Select the ref file attached
set level drainage_pipe override colour to blue( 1) from its original not by level red (3)
This works if I do it by hand but I have 50 files or more, and I dont want to do this by hand...
I thought of doing it in the ref file but it doesnt come thru to the active file unless I detach and reattach not desirable...ie if changes are made after it was attached as ref...
I tried the level synchronise keyins but it just reset all the colours to the bylevel colours in the attached dgnlib so lost the manual oride setting colour blue (1)
I read in old post you can only do it thro batchpro script...
It had something like this but it doesnt do anything i think its because the dgnlib wont let me change it...
(but why can I do it by hand in the level manager of active or even change it in the ref and detach and reattach and that works! and I''m still changing what is meant to be governed by dgnlib!)
As I said this batchpro script didnt do anything...!
level set override color on file:F:\temp\refile.dgn level set override color ON 1 file:F:\temp\refile.dgn DRAINAGE_PIPEupdate view extendedfiledesign
This can be done through Batch Process. It's been a long time since I had to do this, but it can very touchy. Everything in the companion text file needs to be exact. I am not able to access my office PC at the moment to find the exact format of the key-in. Once I can gain access I will provide the key-in. I think your second line is close, but remove "ON" from that string. If you have MS_REFDIR set and your file is in the path you do not need to identify the full file path.
level set override color 1 file:refile.dgn DRAINAGE_PIPE
Power InRoads v8i V08.11.07.615
Thanks but I think it is because I have a dgnlib pathed in configs that has the same level names with assigned colours etc but no orrides assigned.
But I'll try again, same result didnt work with or without path, but I can do it manually with the levelmanager overrides choose the level and a colour.
This really frustrating as this is the most basic function for most drafters you build everything and later your bosses want you to change a colour in an attached ref thats used everywhere... no problem for me in nested refs I change it there and it works every where
MicroStation user since 1990 Melbourne Australia.click link to PM me
I feel your pain with the bosses wanting things changed.
The key-in will work with the .dgnlib levels. That is how we operate. I have transitioned from drafting into design so I do not perform these sorts of tasks very often now. I need to look at my text file on my office network to find the exact key-in strings.
A colleague & I started keeping a text file with all of our key-ins to modify files using batch process. When we add something new we keep it in the file and just comment out that line. When we need to use it again we copy the line to the top of the file and modify it to match level & file names. That way you do not need to remember the strings or retype them.
Once I can log into my work PC I will find those specific key-ins. My IT guy must still be sleeping.
thanks a lot a have the same approach, I also keep a docs folder with useful stuff like this and other keyins script files etc and a paper scrapbook ( my Mstn Bible .. now bulging at the seams .... been adding to it for more than 20 years as its vol 2 now... vol 1 was the first 10 years and was a exercise book with just hand notes... Vol 2 - is A4 spiral bound has printed cut and real paste texts from forum , web sites, tutorials, etc my own scripts and Fkeys etc and is my fall back when I cant find stuff it was going to be the main resource for my book in my retirement "Microstation the drafters reference Guide V8i", but CE stuffed that idea a long time ago)...
Its really strange that this works perfect if the ref is a nested ref changed after the fact by hand in the nest and its updated in all drawings it was attached, but a direct attachment changes after the fact dont work and you need the batch script ...
I'll check in tomorrow
That's because any change whatsoever to the level state of a reference file will "cut" the connection to that reference for any future level changes, and there's no way to re-synch it. If you attach a reference file, then turn some of those reference levels off in one view, the reference levels will no longer respond to any changes made in the original file. You have "told" MicroStation "I want to manage how this file looks from here - forget about what it looks like on its own."
And it IS possible to "break" that connection with nested references. It's just not as common because, if I use the nested ref to control what my reference looks like, then I am less likely to change the reference appearance in the "top" file. But it DOES happen, and it's just as much of a pain. I believe if you search, you'll see a thread or two I've started about this.
I understand this (sort of) but I don't agree with it. I really wish there were some sort of command to synch a reference back to itself, instead of the DGNLIB, but there isn't. WAD or whatever...
Good luck, Lorys!
Microstation 08.11.09.829orPower InRoads 08.11.07.615
So I am at the office and found my key-ins. The format is
LEVEL SET OVERRIDE COLOR ON file:58758_C01_CT_XP_SURV01_01.dgn V-BLDG-OTLN
LEVEL SET OVERRIDE COLOR 1 file:58758_C01_CT_XP_SURV01_01.dgn V-BLDG-OTLN