Batch Convert Files - Place all Reference Files to a Separate Folder

Hello,

Is there a way in microstation when you batch convert your files, you can tell microstation to take all the reference files and place in a separate folder, e.g. like called "Reference," instead all in one folder..I'm batch converting some files for a client and I wanted to provide them with all our cad files and batch convert places all the references and design files all together in the same folder..

But I wanted to save all my references to separate subfolder to keep it more organized while still preserving the links updated by the batch convert process. 

Parents
  • There are two ways of doing this.(Let's assume you are converting to DWG format)

    Either use the current directory structure where your reference files are found and when converting the master files the that same path will be used when converting the reference file.

    The other way is to select all your files including your reference files for conversion. Select all your reference files and then set the "default destination" location of reference files to a folder called "Reference"



  • I actually still wanted to keep the files as a .DGN file, so left the output format as "V8" and tried your two method and it didn't work for me. I didn't bother trying it with setting output as .DWG because it's no use to me. So I'm back to square one, the only way I know how of convert a master file with it's external files is by using the following method:

    Method 1:
    - I have my master file open in microstation
    - do a "Save As" and in that window press the "Options" button -> go to the "Reference" tab and
    - check the "Convert Reference Files" on
    - then save my master file to desire location, say into a test folder on my desktop

    Method 2:
    - I have my master file open in microstation
    - Utilities ->Batch Process
    - Edit-> Add file, add my master file
    - then Edit-> V8 Save Option, and do the same thing in Method 1 above, i.e. Ref Tab and turn on convert ref file
    - then process

    Both of these method allows me to export my master file with its ref files into one location with the ref file-path rewritten to the new location, say a test folder on my desktop..this method gets me halfway to what I want to achieve

    what I can't figure out is if there method to instead redirect the ref files to a different folder instead all bunch up into one folder, like what Method 1 and 2 above does, because this would really help me organize my files when I send files to a client so they know what is the master file and what is the ref files

    Hopefully that all made sense, of what I'm trying to achieve
  • Unknown said:
    I actually still wanted to keep the files as a .DGN file

    So what is it that you're converting?  It looks like you want to keep the DGN files the same, and what you're asking is "How do I move references to a different folder?"

    1. Use Windows tools to move the reference files
    2. Change MicroStation configuration variable MS_RFDIR to include the new location

     
    Regards, Jon Summers
    LA Solutions

  • If one changes the MS_Refdir to a new location does the batch convert send the converted ref files there and repath in ref manager... 

    The poster wants to give these files to a client  not use them locally  so the client has to be able to open a base file and still see the ref attached in a sub folder..

    Maybe the ref path relative would help?

    I think you need some vba  to repath the ref files to a new subfolder..

    If its not too many files you could try using bulk rename utility to rename your nested files with XR_original file name then move XR_files to XRef_folder and repath manually with explorer or via vba...

    If you have hundreds then BUY Axiom tools they have Refmanager tool cheaper than project wise and easier to use,  this tool will repath all ref files via  GUI... very good I've used it...

    Do you know  you can drag and drop from explorer into the ref manager lower window this will repath things

    BTW I have an macro that will list  all the ref attachments for every file in a folder into a csv file ( doesnt work with nesting)  this would help work out what ref files belong to which parent before you move them...

    If you want the macro just post here ... or PV me...

    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 

  • Unknown said:
    If one changes the MS_Refdir to a new location does the batch convert send the converted ref files there

    MS_RFDIR is a multi-path variable.  If it points to more than one folder, which path would you choose?  How would you tell the batch converter what to choose?

    Unknown said:
    Maybe the ref path relative would help?

    Or set MS_RFDIR = $(_DGNDIR)reference-folder/

    Unknown said:
    You could try using bulk rename utility to rename your nested files

    By reassigning MS_RFDIR you don't have to rename anything.  Why make it more complex than it need be?

    Unknown said:
    You can drag and drop from explorer into the ref manager lower window this will repath things

    Now that's a good suggestion!

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:
    Lorys
    If one changes the MS_Refdir to a new location does the batch convert send the converted ref files there

    By reassigning MS_RFDIR you don't have to rename anything.  Why make it more complex than it need be?

    I still dont  get it.. I believe the  ref  path variable only works local network it wont work if he moves his ref files to new folder then  has to give all the  files to client out side the network.. well its never worked for me  in the past.. but it  works great in house I will admit..

    I mentioned the rename so as to make more obvious to client which are the XRef files very common in my experience with acad users to preface with XR_ and put all files in same folder to prevent loosing ref paths...  but if he was to move all his ref files to say xref folder then use the drag and drop from explorer to re attach all the ref files this worked in small test I did .. but without a list of what belongs to who it would be very tedious for lots of files with lots of refs...

    There must be an easier way.. ie vba or PWise or even axiom tools  especially if its lots of files ie more than 100 base files not ref files...

    another  question .. lets say user makes an folder called Xref then uses the  variable to redirect path to ref files mentioned above.. then user runs packager to save out the base and ref files....to pzip  wouldnt  packager make the xref folder and would it still work at the other end if unpacked without the variable defined by external user?

    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 

  • ok I found the old mvba macro to repath / replace existing ref attachments 

    Its pretty good been testing it a  few times but  you need to follow specific steps in th right sequence or it will not do what you want..

    Now as I suggested before for giving your files to external source  make a new folder called xrefs copy all your ref files into that folder

    then open the zip file attached here  copy the mvba file  to your vba macro folder directory  so mstn can find it with the VBA project manager later..

    now open the instructions file and the first jpg and follow the instructions the 2nd  jpg  just shows the result..

    note you may have to close and reopen the ref manager  to see the result..

    I suggest you do a trial run with BACKUPS  first  and dont try and do too many files at once  single file until you confident  then run multiples if it works with the backups then go ahead and run on originals but make new backups first as you can never tell what may go wrong....

    I'm glad I rediscovered this tool as I can really use it more often  these days....

    Enjoy.. let me know how it went  for you ....

    refrename-v3.zip

    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 

Reply
  • ok I found the old mvba macro to repath / replace existing ref attachments 

    Its pretty good been testing it a  few times but  you need to follow specific steps in th right sequence or it will not do what you want..

    Now as I suggested before for giving your files to external source  make a new folder called xrefs copy all your ref files into that folder

    then open the zip file attached here  copy the mvba file  to your vba macro folder directory  so mstn can find it with the VBA project manager later..

    now open the instructions file and the first jpg and follow the instructions the 2nd  jpg  just shows the result..

    note you may have to close and reopen the ref manager  to see the result..

    I suggest you do a trial run with BACKUPS  first  and dont try and do too many files at once  single file until you confident  then run multiples if it works with the backups then go ahead and run on originals but make new backups first as you can never tell what may go wrong....

    I'm glad I rediscovered this tool as I can really use it more often  these days....

    Enjoy.. let me know how it went  for you ....

    refrename-v3.zip

    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 

Children
No Data