Add Reference to the SWTaskAddIn?

     I have a macro that I want to run as a task using the SWTaskAddIn, unfortunately I have not been able to add a reference to the EDMInterface dll, I thought I could add it using

Application.VBE.ActiveVBProject.Reference.AddFromFile "...\\EdmInterface.dll" OR adding it to the Files under the Properties for the Add in.

Is this possible or will I have to create a new Add In?

     Any ideas or suggestions would be helpful,


SolidworksApi macros
Answers 4
AT
AT 2013-09-25 Best Answer

Hi Jason,

You can download the sample script of how use ePDM APIs in the SWTaskAddin custom script from myIntercad.myToolkit – App Store for SolidWorks related content.

Script description is:

<p style="margin-bottom: .0001pt;"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';">While using <strong><em>ePDM SWTaskAddin</em></strong> it is possible to modify the script for a standard task like <strong><em>‘Convert’</em></strong> as well as create script from the scratch. However it is not possible to add third party references to the script. So if it is required to use EPDM APIs or any other APIs like <strong><em>MS Scripting</em></strong> or <strong><em>Database libraries</em></strong> it is became more problematic.</span></p><p></p><p style="margin-bottom: .0001pt;"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';">Fortunately the easy way to workaround this is to use late binding in the macro. This code snippet demonstrates how to use ePDM API to check-out the file, open in SolidWorks and add a property, than save and check-in.</span></p><p></p><p style="margin-bottom: .0001pt;"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';">The content of the file should be copied into a <strong><em>‘Script’</em></strong> section of <strong><em>SWTaskAddIn</em></strong> in <strong><em>ePDM Administration</em></strong> panel.</span></p>

Select and download the sample at this path SolidWorks API Tutorials/ePDM/How To.../Task AddIn/Use ePDM API in SWTaskAddIn or just enter id=104 in filter and Hit Enter or ‘Filter’ button.

You can download the myIntercad for free at this link: http://intercad.com.au/myintercad/

Please let me know if you have any questions or issues.

____________________________________________________

Regards,

Artem Taturevych, Application Engineer at Intercad (Australia)

translationXpert – add-in to translate SolidWorks models

myIntercad – an integrated tool for SolidWorks Professionals

LinkedIn SolidWorks API Education Group

JK
JK 2013-09-25

Thank you Artem!

JK
JK 2013-09-25

Artem, I was not able to download the toolkit, is it possibl to send an example of the late binding for EPDM?

AT
AT 2013-09-25

Please see the file in the attachment.