Hi,
I m Damien, I am currently running Microstation Connect on Windows 10 Pro.
I have been struggling for some time now to use the key in level purge in a batch process. As the Key in is working with the command dialog box, I was hoping tha the same key in would work inside a batchprocess text as some key-in have been tested seems to run. I was wondering if anyone of you could help me out.
So I think that the structure of the key-in is ok for the dialog box as it works through the dialog box, but may it is not through the batch process.
Basically the key in i used is
LEVEL PURGE dest:PGOC_BT_CONSTRUIT CâblesBT
You might find some grammatical mistakes, but this is because I am french ;-).
Looking to hearing from you guys.
Thank you anyways.
If it is working in the command line then it should work in Batch Process. After typing it into the command line and you verify it is working copy & paste that into you text file for the Batch process. If you type it into the text file manually you could have something mis-spelled, extra spaces or a syntax error. These can be vary hard to identify as you are starring at it trying to figure out why it does not work.
Microstation CONNECT - 10.17.2.61
ORD - 2021 R1 10.10.1.3
ORD 2022 R1.1 - 10.11.3.2
ORD 2022 R3 - 10.12.2.4
Microstation v8i SS 10 - 08.11.09.919
Power InRoads v8i - 08.11.09.615
ProjectWise - 10.0.3.453
Try putting the level name in double quotes like this...
LEVEL PURGE dest:"PGOC_BT_CONSTRUIT CâblesBT"
In a script file things like names, file paths, etc. that include spaces usually have to be enclosed in double quotes.
Rod WingSenior Systems Analyst
Are you sure you want the PURGE command? , if both destination level and source level are not defined then it moves objects in the named level level to the default level..
personally I try not to use the default level .. in the help there is a very useful very long list (about 3 pages printed out) of the level commands and their syntax and how they work especially the level miscellaneous commands where the purge is listed ..
FYI microstation does not like file paths and names with spaces( so you should always use the quotation marks as mentioned by Rod).
I am old dos boy so this was hammered into us early so hard and so often, that I still unconsciously use underbars in level names, file names and file paths in windows explorer and microstation.
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
Hello guys,
First of all, thank you for your replies. I think I wasn't clear in the first message but the key in i used is sending the level "CâblesBT" into the level "PGOC_BT_CONSTRUIT".
I've tried with the double quotes like you suggested, but unfortunately and once again as it works in the command line it doesn't with the batchprocess script.
I am currently using the batch process tool of Microstation.
I am going to add my dgn and the details of my project so you may understand or have a look at my project. The idea is to send levels into other ones and delete them, plus delete some other which I am struggling to have these removed, the levels seem to be empty and yet not removable, I am talking about all the levels that begin with "Montataire". So if you can help me on this one too, it would be great.
for the Montataire I used the key delete unused levels but it doesn't seem to work.
So here is the key-ins I used and worked in the command line but not in the script. It is not the script I used just an example of the key in used as I tried to make them run, one by one.
Also the key ins are working in the command line with and without the double quotes.
And I don't know if I have to use the filedesign and the compress key-ins at the end of my script to save the changes or not.
# remove the levels I don't want in the file #------------------------------------------------------ level delete Montataire FDP ok$0$SymbolesFixes delete unused levels # create some levels I need #---------------------------------------------------------- level create AUTRES level create COFFRETS_ET_ACC level create PTRL level create PGOC_PROTECTION_MECANIQUE # merging levels into those I need #----------------------------------- LEVEL PURGE dest:"PGOC_BRCHT_CONSTRUIT" "CâblesBrancht" LEVEL PURGE dest:PGOC_BT_CONSTRUIT CâblesBT LEVEL PURGE dest:PGOC_BT_CONSTRUIT TxtCâblesBT LEVEL PURGE dest:COFFRETS_ET_ACC AccAffBT LEVEL PURGE dest:COFFRETS_ET_ACC AccAffTLCEle LEVEL PURGE dest:COFFRETS_ET_ACC AccNonAffBT LEVEL PURGE dest:COFFRETS_ET_ACC RMBT LEVEL PURGE dest:COFFRETS_ET_ACC Textes LEVEL PURGE dest:AUTRES SymbolesFixes LEVEL PURGE dest:AUTRES Drap+TxtIndiffEle LEVEL PURGE dest:AUTRES Etiquettes LEVEL PURGE dest:PTRL PGOC_PTRL LEVEL PURGE dest:PTRL CALQUE_PTTOPO_MAT LEVEL PURGE dest:PTRL CALQUE_PTTOPO_ALT LEVEL PURGE dest:PGOC_PROTECTION_MECANIQUE ProtectionsIndif LEVEL PURGE dest:PGOC_PROTECTION_MECANIQUE TxtProtecIndiff # This command doesn't work LEVEL PURGE dest:PTRL PTTOPO #-------------------------------------- # command lines that I don't know if they are of use for my project, in order to get the "Montataire" levels removed from the file #-------------------------------------------- delete unused levels delete unused linestyles delete unused dimstyles delete scdefs all compress filedesign
Unfortunately the dgn i am working on is too big so I can't add it to this message. If you guys have an alternative way to post 15mb dgn files, I am all ears.
Looking forward to hearing from you guys.
Thanks.
Try changing the code page for the batch-file. Since your level name has special characters it might cause problems in scripts. Try switching between ANSI and UTF-8.
/Krister
Owner consultant at Surell Consulting AB