Hi,
I'm using Matlab to produce geometry data, including splines and I want to be able to place the sketch elements into SW.
I've got SW running as an through Matlab and can create and operate most items, except when arrays need to be passed
Simpe example:
SW=actxserver('SldWorks.Application'); %start the link SWEd = invoke(SW,'GetEdition'); SWRec = invoke(SW,'GetRecentFiles'); %getENV = invoke(SW,'GetEnvironment'); %take control Part1=invoke(SW,'NewPart') %new part SWSMan=invoke(Part1,'SketchManager') S1=invoke(SWSMan,'InsertSketch','1') %new sketch SEG1=invoke(SWSMan,'CreateCircle',0, 0, 0, 50, 50, 0) %circle SEG2=invoke(SWSMan,'CreateLine',0, 0, 0, 50, 50, 0) %line
An example is CreateSpline (or ICreateSpline2),where a double is asked for. Can't get it to work. Any advice or work arounds?
SEG23=invoke(SWSMan,'ICreateSpline',9,[0 0 0 50 50 0 100 100 0]);
Many thanks
SolidworksApi macros