I'm looking to see if there is a macro out there or that can be created to import a linked text file into the equation folder, with the end goal to have this done over multiple parts.
Have a look at the following example: 2017 SOLIDWORKS API Help - Pack and Go Part and Linked Equation Example (VBA)
Thanks for that, having a play around this kind of does what I need.Is there any way this can be done but without the pack and go process. Fairly new to Macros/API so any help would be most appreciate.
Sorry, I should have been more specific. I don't think so you can import the equations directly from an external text file. You will need to have equations in the part document exist to be linked to an external text file. You also mentioned that you need to do this for multiple parts. Will all parts have same equations or will they be different? If they are same across all parts then you can read the data from text file and create equations first and then link them to the same text file. You will find plenty of example online to read data from text file. But you are new to API which will make it more difficult.
Let me know if more help is needed.
Thanks again for getting back, likewise maybe I should have specified, what you are describing is what we are currently doing having one text file that is linked to multiple parts with the same equations in each part. The issue we have is that if you want to add a new value to the text file (for example: "Drawer_Depth" = 20) you have go into every part and re-import the file. So I am wondering if there is a macro out there or that can be created that could automatically do this, opening every part in an assembly and importing the text file.
You will probably have to read the data from the text file and check whether the equation exist or not in each part and if not add the equation to part and link it to external text file using VBA. I don't think there is a macro exists that does this. You will find plenty of examples of adding equations using macro on this form website and modify to suit your requirements.
I am not sure of any other method.
Let me know if you stuck.
It's an old thread, but I wonder if you managed to find a solution for this.
I'm in exact same situation as you described initially so I'm looking for means to automate
Retrieving data ...