How to get ON_InstanceDefinition->SourceArchive() in opennurbs6 API’s

Hi,

In previous versions SourceArchive method use to return name of the source archive. But this method is not available on ON_InstanceDefinition in opennurbs6.

Any alternative method to get name of the source archived using instance definition?

-Sandip

Hi @sandip.ichake,

Use ON_InstanceDefinition::LinkedFilePath.

– Dale

Thank you Dale!

Follow-up question: My old code using SourceArchive also called GetAlternateSourceArchivePath if the filename returned by SourceArchive cannot be opened. Is there an equivalent for that in 6.0?

Thanks,
Sol

Hi @colomon,

In openNURBS 6, use ON_InstanceDefinition::LinkedFileReference which returns a ON_FileReference. From here you can get the absolute path using ON_FileReference::FullPath. If tis path is not found, then use ON_FileReference::RelativePath and fill in the path like you with in v5.

– Dale