What's new

How to tell if files are missing when opening an assembly?

If I open an assembly with a missing file in the GUI, it shows this dialog:

missing files.png

But if I use OpenFileEx(), it silently ignores the missing files. Is there a way to know that it happened? I see IADDesignSession.HasErrors but it's just a boolean and I don't know what errors it's going to be set by.
 

stepalibre

Alibre Super User
You can use ConstituentFilePaths to get the constituents and then check if the file paths exist or not. This can be a slow process for large assemblies.
 
Thanks Stephen. I see it does include the files that are missing. I might compare the filenames from ConstituentFilePaths to the ones in the occurrences to identify missing ones.
 
Top