How to change IEdmFile type to IModelDocExtension type

Programming and macros
cdantonio
Posts: 11
Joined: Mon Nov 07, 2022 4:54 pm
Answers: 0
Location: Bay Area
x 8
x 2

How to change IEdmFile type to IModelDocExtension type

Unread post by cdantonio »

Need some help figuring out how to change data captured as an IEdmFile to IModelDocExtension. This is so I can list external references of a file without opening it in Solidworks as my active document.
User avatar
AlexB
Posts: 449
Joined: Thu Mar 18, 2021 1:38 pm
Answers: 24
x 243
x 398

Re: How to change IEdmFile type to IModelDocExtension type

Unread post by AlexB »

The two interfaces you listed are from different APIs. The IEdmFile is PDM API and the IModelDocExtension is Solidworks API. The info you've given doesn't make much sense to me. Can you provide a lot more detail about what you're trying to do?
User avatar
JSculley
Posts: 590
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 7
x 822

Re: How to change IEdmFile type to IModelDocExtension type

Unread post by JSculley »

Use the Document Manager API. Specifically: ISwDMDocument27::GetExternalFeatureReferences3
cdantonio
Posts: 11
Joined: Mon Nov 07, 2022 4:54 pm
Answers: 0
Location: Bay Area
x 8
x 2

Re: How to change IEdmFile type to IModelDocExtension type

Unread post by cdantonio »

Looking for a way to transfer data between those APIs. Similar to Document Manager APIs GetExternalFeatureReferences except I don't have a license for it. I want to find something similar to ListExternalReferenceFileCount but for IEdmFile. For example something like this https://help.solidworks.com/2019/englis ... cies2.html except specifically for external file references.
User avatar
bnemec
Posts: 1869
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2463
x 1344

Re: How to change IEdmFile type to IModelDocExtension type

Unread post by bnemec »

cdantonio wrote: Fri Dec 09, 2022 1:34 pm Looking for a way to transfer data between those APIs. Similar to Document Manager APIs GetExternalFeatureReferences except I don't have a license for it. I want to find something similar to ListExternalReferenceFileCount but for IEdmFile. For example something like this https://help.solidworks.com/2019/englis ... cies2.html except specifically for external file references.
The Document Manager API license is free, just takes a few days to a couple weeks to get after you request it.

I'm still a bit confused at what you're trying to do. Do you want file refs and you have PDM Pro? Just use the PDM API to get the file refs. AFAIK that will get you the same file ref data as SW or the Doc Manager API. IIRC you don't even need to cache (get) the files to get the file reference tree.
cdantonio
Posts: 11
Joined: Mon Nov 07, 2022 4:54 pm
Answers: 0
Location: Bay Area
x 8
x 2

Re: How to change IEdmFile type to IModelDocExtension type

Unread post by cdantonio »

I have SOLIDWORKS 2020 which Dassault currently doesn't offer Document Manager API for. When requesting a key, is there any difference if I select SOLIDWORKS 2021 as my product version?

Yes, I have PDM Pro and I'm trying to get a list of all parent assemblies that reference files outside of the vault.
User avatar
JSculley
Posts: 590
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 7
x 822

Re: How to change IEdmFile type to IModelDocExtension type

Unread post by JSculley »

cdantonio wrote: Fri Dec 09, 2022 2:02 pm I have SOLIDWORKS 2020 which Dassault currently doesn't offer Document Manager API for. When requesting a key, is there any difference if I select SOLIDWORKS 2021 as my product version?

Yes, I have PDM Pro and I'm trying to get a list of all parent assemblies that reference files outside of the vault.
Document Manager Keys are backwards compatible:

=============================
Starting with SOLIDWORKS 2015 Beta, partners and active subscription users that need a license key for the SOLIDWORKS Document Manager will need to update the key each year in order to read the most current version of SOLIDWORKS files. Once obtained a key will continue to work unchanged for older versions of SOLIDWORKS files.
===============================
Post Reply