How to identify an in-context part ?

Hello All,

I am working on a tool with needs to extract the Links information of the SW files and then dump it into an XML.

I need some help with SW 'in-context' link.

I have an assembly with one part

then I have added new part in the assembly with is created in-context with the assembly.

When I called Componenet2.GetChildren() on the assembly's Component2 pointer, it returned normal as well as in-context part.

Hence I am not able to diffrentiate between normal and In-context part.

I have tried calling ListExternalFileReferences2() on the assmebly's Componenet2 pointer.

Still I could not get an information out of this.

Is there an API with can help me fetch the in-context link from assmebly so that I can identify the in-conetext part ?

Thanks in advance.

Regards,

Sumedh

SolidworksApi macros