Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
torben_schroederXDK86
301 Views, 6 Replies

automate re-referencing files with lost reference

I have many assemblies and simplified parts with broken references due to renamed or relocated files.

 

Most of the time, these broken references are due to a restructured file organization, where about 80% of all created parts are now stored in a single folder (let’s say the path is "C:\BigFolder") without much change to their names.

 

When a file has lost a reference due to a name change, it's primarily because the naming format was originally like this:

 

[Partnumber as numbers only] [Partname]

 

And now it’s structured like this:

 

[Partnumber as numbers only]_[Partname]

 

As you can see, the only change is that the seperator is now an underscore instead of a space.

 

My idea was to let the macro search for the first part of the name (the part number) in "C:\BigFolder" and attempt to find the closest match. If nothing is found, the macro should skip to the next broken reference.

 

Since the name is very similar and the new path is known, I think automating this should be possible.

Mmaybe with a VBA macro, iLogic or something similar.

But I'm unsure how to start—both in terms of accessing the reference data and implementing the macro.

 

Does anyone have ideas on automating this?

Labels (3)