I have a (2) part problem but maybe there is a solution I'm not aware of. So I'm going to try my best to describe the situation and how we got were we are.
This all stems from our cell library which is massive like 500 .cel files in a range of directories all located in the organization directory located at C:\ProgramData\Bentley\...\Configuration\. For years we have worked with a cell library menu system in V8i (and XM, V7 and J etc. before that) with directed key-in links using the following...
attach library C:\ProgramData\Bentley\CONNECT Edition\Configuration\Organization\Cell\OP-Items_lib\Bearings\vender\file.cel; dialog cellmaintenance;
So all these paths are directed very specifically to locations within the Cell directory of the Organization directory. For a better understanding of our ribbon layout see the picture below.
See here in lies our issue, we just upgraded all of our Microstation licenses to AECOsim and now the organization folder is located at C:\ProgramData\Bentley\AECOsim CONNECT Edition\Configuration\Organization...
I can manually re-code all of our links to point at this location and I fully expect to have to touch every single one unless there's some awesome text based interface to open .dgnlib files were I can do a massive find/replace text but I'm thinking that's not possible. So no big deal easy to fix one time but I would like to change the key-in to be something more like....
attach library $(_USTN_ORGANIZATION)Cell\OP-Items_lib\Bearings\vender\file.cel; dialog cellmaintenance; (except this doesn't work)
This would essentially future proof the key-ins so long as we're using a connect product to always point at the organization folder within the connect installation for the product we're running. I notice there is a MS_CELL variable which in all honesty we've never used and I have no idea what it really does and how it's used the help menu is pretty vague an example would be nice. So maybe this is the solution I need to use or there's some other option that's more elegant I haven't thought of.
So in summary
problem 1 is to find if there is a better way to create the key-ins which point at our cell libraries so that this doesn't happen again in the future.
problem 2 is there a fast and easy find/replace text means to change all of my paths that say "C:\ProgramData\Bentley\CONNECT Edition\Configuration\" to whatever the conclusion is to best solve problem 1.
I recommend to see this article about a proper syntax, when a variable name is used in MicroStation key-in.
Labyrinth Technology | dev.notes() | cad.point
Answer Verified By: Grant Wood
This worked though I didn't fully understand it at first with the example of a VBA (I've done that in the past) so for anybody else looking to do something like this just add the $ in front of you key in so in my example just adding the $ and the space before the key-in I already had worked.
$ attach library $(_USTN_ORGANIZATION)Cell\OP-Items_lib\Bearings\vender\file.cel; dialog cellmaintenance;
If anybody knows how to edit the dgnlib file in a more text based format to find/replace the text to update all the paths faster let me know otherwise I'll assume I have to do them all one at a time.
Grant Wood said:If anybody knows how to edit the dgnlib file in a more text based format
You can export your customization to XML format (dialog Customize, menu File > Export), edit it and import back. But it's just an idea only, I have not tried to modify existing customization in this way.