Search code examples
solidworks

solidworks EPDM API get list for cards


Is there a way to get values of a list for card from solidworks EPDM API ? If not my only way will be to request the database. In this case, is there a way to get the database connection string from API ? Thank you


Solution

  • Unfortunately the answer to both of those questions is no. There is no IEdmCardList object, or a way to get a connection string from the API.

    What I have done is create my own IEdmCardList object that inherits from IEdmObject5. Then you can create it and use it as an object instead of putting the database code in your project. I used an IEdmDictionary5 to store the connection string (with a read only user on the database). This isn't secure, but I haven't found a secure way to do it.

    Also be wary of any SOLIDWORKS provided API samples for this. Most are subject to simple SQL injection.