AnsweredAssumed Answered

Is it possible to run run solidworks macro file via MATLAB mfile?

Question asked by Mostafa Abbasi on May 27, 2016
Latest reply on Jun 1, 2016 by Mostafa Abbasi

Hi everyone, 

I want to run solidworks macro file ( e.g. file.swp) invisible by MATLAB mfile, please help me.

I've written a below mfile to open SolidWorks and run a macro file. But It doesn't work.

 

swApp = actxserver('SldWorks.Application')

set(swApp, 'Visible', true);

Part1=invoke(swApp,'NewPart');

S1=invoke(Part1,'RunMacro','\Macro.swp')

 

 

Thanks

Outcomes