recently struggled on accessing the property CopiedParts of the SolidEdgePart.Model object.
It seems this property is available only on PAR/PSM files referencing at least one copied part. I expected the property as usually to exist always and just returning an empty collection in case of unexistent copied parts. But instead the property itself is missing!
Does anybody know how to determine whether a PAR/PSM file has copied parts or not?
Currently I'm catching an exception, or could use the RevisionManager API to check for references.
As far as I know, this issue happens among a number of API features.
When a document is lacking certain stuff, simply the associated collection doesn't exist, you can't reach it. I have recently meet this situation when inspecting missing links in Drawing Views. Here, I had to use exception catching against SolidedgeDraft.ModelLink.ModelDocument to see if the Document is reachable.
From my narrow programming knowledge, exception catching is the only way to go. Maybe not too elegant, but not a problem at all. So I'm not sure if I'm missing something from your questions.
Thank you for confirming issues like this. In my opinion this is a very strange issue, since then you never know which property might not be available in which case. I've never seen objects behaving like this before.