[V8i VBA] Change reference file name and path? (Bonus if I can figure out user forms)

We have received a number of files from another firm so that we can finish the design they started. We (I) need to re-path the references to match our directory/drive setup. For most of these, it's not too bad, but there are a few files (cross section sheets) that have hundreds of attachments (duplicates of the same couple of references). In addition to the references needing the path changed, a couple of the files (borders, mainly) have been renamed in this transition (for reasons) so even if I could get the path "right" the file as previously named no longer exists. We don't use project configurations yet (working on it) so CFG variables won't really help me.

I thought this would be a great opportunity to dust off my (very rusty) VBA skills. It might just take me less time to write a macro than it would take to repath 200-300 references by hand. Since the attachments are actually just the same three files, over and over again, I thought I could do something like this.

Scan the file for attachments, enumerate and construct an array of attachments
Create a list of attachment file names (discarding duplicates)
Populate a list box (?) with the file names
Select a file to replace/repath -> OK
Open a file explorer dialog to browse to the replacement file
step through the array of attachments and change the reference attachment from the old file to the new file. Keep stepping.
Select the next file to replace.
Repeat until finished.

Some of this I know I know how to do some of it I think I know how to do, but the interaction with the user forms in the MicroStation VBA environment is fuzzy to me.

Is there anything wrong with my thought process? Any suggestions, or known issues?
Thank you.

MaryB

Parents Reply Children
No Data