In my case false positive is less bad than false negative.
Thanks for all the help you provide! I don't know how anybody could find out all these little details otherwise.
Na, I was just looking for a catch-all for any possible change even if it had some false positives. Checking the files themselves would be the safest way since nothing can change if the files aren't changed.
Oh that's good news. I don't think the API can open packages anyway, at least as I remember it, so nobody would probably be using those with my application.
Nonetheless, I've already abandoned the idea of checking for missing files. It's a fairly unlikely event anyway and I think people will...
The specific case that I found was this assembly https://s3-us-west-1.amazonaws.com/alibre-usa/SampleModels/0_Alibre_Wankel_Airplane_Engine.AD_PKG If you extract it then open it with the API, the constituentfilepaths are wrong and look like they're from the computer that previously saved it. So...
> This is related to session data not reflecting data on disk. You'll need to ensure assemblies and parts are properly saved and regen/updated before any code is run on those files.
Ah, so I have to save it before using ConstituentFilePaths. I'd rather not because I don't want my application...
I don't know how. If I open an assembly with the API and it has missing subassemblies or parts, the only way I know to detect that is if they're in ConstituentFilePaths but not on disk. However, since the path part of those filenames is unreliable, I might have to do a risky and expensive search...
I don't think that'll work safely because sometimes the paths in ConstituentFilePaths aren't the actual locations of the files. Maybe they're where the files used to be when the assembly was saved or something.
Yea, I realize multiple occurences of the same part only appear once in ConstituentPaths(). But the problem here is that there's a file in ConstituentPaths() (two blocks's AD_ASM file) which doesn't exist in any of the occurrences at any level in the tree.
I'm trying to detect if an assembly...
I can't make sense of what's happening here. When an assembly has a 1st-level subassembly that's suppressed, then I can find it in the collection returned by:
IADAssemblySession.RootOccurrence.Occurrences()
and it has .IsSuppressed = True as expected.
But if there's a 2nd-level subassembly...
Wow, AP242 solves the degenerate_toroidal_surface incompatibility problem! But is it available via the API? I can only find the other two STEP formats.
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.
If I open an assembly with a missing file in the GUI, it shows this dialog:
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.
Coming back to this, I'm still having these messages and can't seem to do anything about them. I hope someone else can confirm they're normal and safe to ignore.
They're not exceptions in my application so I can't catch them. They're just messages in the Immediate window of Visual Studio. I...