Checking source archive property of an InstanceDefinitionGeometry in a File3dm object

Hi,
I want to check if an InstanceDefinitonGeometry in a File3dm object is linked to any external file or not, and if at all it is, then get the path of the external file. Is there a way to do this?
For example, InstanceDefinition class has a property called InstanceDefinition.SourceArchive, but there is no such property for InstanceDefinitionGeometry.
Thanks.

Hi @Darryl_Menezes,

Keep in mind that the geometry linked instance definitions is not stored in the target .3dm file. Thus, if you find a File3dmObject whose ObjectAttributes.InstanceDefinitonGeometry attribute property is true, then the instance definition is either InstanceDefinitionUpdateType.Static or InstanceDefinitionUpdateType.LinkedAndEmbedded.

In any case, the InstanceDefinitionGeometry class, which is the File3dm of an InstanceDefinition, does not expose enough stuff for you to determine any of this. I’ve created a YouTrack item to beef this class up a little.

https://mcneel.myjetbrains.com/youtrack/issue/RH-51399

– Dale

2 Likes