How to read filename from solidworks assembly?

Hello.
I have a work to convert solidworks aseembilies to stp, but my source 3D solidworks files are in another machine, so I have to pull relevant parts from that machine.
To read the relevant parts, I use the A3DTreeNodeGetName to retrieve node name as the part name. However, when I use the Hoops Demo Viewer, I could see the viewer can display the absolute path which is very useful for my work.
How can I retrive the original absoule path as the demo viewer app does when using the exchange SDK?

Hello @dzhhhgit,

Welcome to the forum !

You can try the function A3DAsmProductOccurrenceGetOriginalFilePathName to retrieve the file path.

Thanks,
Tino

Hello, thank you for your response!
After I created the post, I found a function A3DAsmGetFilesPathFromModelFile could satisfy my need. But I am also want to find a function to resolve the actual path of some specific part node.

Your answer helps me a lot. I tried the function A3DAsmProductOccurrenceGetOriginalFilePathName , and found it always returned the assembly path itself.

Then I tried the function A3DAsmProductOccurrenceGetFilePathName above that, it matches my need perfectly.

Thanks for your kindly reply again, @tino !

1 Like