I have 700 line styles within micro station that originate from an .RSC File. All of the line styles contain a keyword which needs to change to another word. Is there any quick way to do this all at once as manually changing the names one by one would take too long.
To be clear you just want to change whats in the rsc file right not whats used in existing drawing, just forward before you make new drawing use the renamed styles right?
In that case what we need is some sort of program that can open it like text and use find replace ... have you tried making a copy and using notepad or notepad++ and find replace to change your keyword?
Then to test it move the original rsc into a folder mstn cant see then modifiy a copy test the all the linestyles still work, if it does then you solved it if not you have back of the orginal you can return all back to normal...
I can't test this for you as my rsc libraries are in protected read only on network.. but it seems logical if your relacing a key word with another, when I open rsc file read only with notepad I can see the names in text but the rest looks like code or special symbols ... if it doesn't need compiling this in theory should work for you..
My concern is what happens to all your old drawings that used the original names linestyles... they will no longer see the old names....
Then this would suggest we need Two rsc files old original and new modified renamed file with new contents.. then you need to batch process all your old drgs to change to the new rsc file with the suggested remap that Otto mentioned... or leave all the old as is and only use the new rsc moving forward from a certain date as your new standard... the later option would be the one I'd push for my my masters.. too much work otherwise...
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
Lorys said:n that case what we need is some sort of program that can open it like text and use find replace ... have you tried making a copy and using notepad or notepad++ and find replace to change your keyword?
Lorys thoughts are valuable, but not this one! RSC Files are no Text-Files. Open and editing with a text-editor normally corrupt the files. You just need the right tools to do the job.
Mit freundlichen Grüßen / Best regards Volker Hüfner
| AB_DATE Engineering Software | ab-date.de |
That is why I said try with copy and iit seemed a logical approach, but I did say it might be a complied format so it may corrupt it...
oh well looks your stuck with create a new rsc file and import and rename one linestyle at a time ... 700 times at 90 second= 17.5 hours work well looks like grunt work for a junior or low paid employee.. maybe student show them the steps and away they go for the next two to 3 days...
Another reason I say make a new linestyle is your old drawings will still need the old line styles to work
Maybe this isnt worth it labour wise and go back to your masters and explain it will take at least 20 hours labour ( allowing for fatigue and boredom slowing you down) and is it worth it ...
Im my opinion, a human approach in such a solution is very ineffective. Concentrated, nobody can work longer than 5 hours a day. Furthermore, it can be assumed that the error rate will be around 2-5% due to decreasing concentration.
This means that it will take about 3.5 days, + 2-3 days, because the troubleshooting will be very nickel-prone. In addition, you can safely add at least 0.5 days until you have trained someone enough to continue working independently.
To develop a program would take about 0.5 days, the execution would take about 700 sec = 12 min. The error rate would certainly be well below 0.1%.
So, it is now to Daniel to decide which way he wants to go
Volker Hüfner said:Im my opinion, a human approach in such a solution is very ineffective
Totally agree with you 100% , but 20 hours pay is a good estimate on an experienced user over a few days and can be used as the basis for building a business case to pay a developer to do it in vba for you instead of manual method and will probably work out cheaper than manual method and lower error rate too and as I said is it worth the effort for manual method and cost?... I think not but his masters may not permit paying for developer...
Lorys said:pay a developer to do it in vba
Not possible: VBA knows nothing about MicroStation resource (*.rsc) files. MicroStation resource files and their internal binary format have been around for much longer than VBA (or, for that matter, Java, C# and MicroStation BASIC).
*.rsc
It's necessary to use the tools provided with the MicroStation SDK. What's required is a tool that will...
.rsc
Regards, Jon Summers LA Solutions
Doesn't seem to take that long to rename each line style, couple of seconds for each entry if using Manage line styles dialog and creating a new RSC. When it is done the linestyles can be replaced in DGN using Remap tool.
Oto said:Doesn't seem to take that long to rename each line style, couple of seconds for each entry if using Manage line styles dialog and creating a new RSC.
Well that was my first approach too, but others convinced me manual method for 700 would be long and too prone to errors...
Too bad it seems vba recorder cant be used for this and modified to do each line style one at a time...