I wrote a macro to clean up our drawings to keep only the outline of the part in order to create a DXF for the laser machine.
When I export the DXF manually, I have a proposal from SolidWorks to know if I should export on all the layers or on the visible layers.
(see attachment)
How can this be translated into the macro? It must be a parameter on the SaveAs3 or an option but I can't find it....
Attached is the macro part concerned....
Set Part = swApp.ActiveDoc
PathName = UCase(Part.GetPathName)
txt = Right(PathName, Len(PathName) - 10)
txt1 = Left(txt, 8)
txt2 = txt1 & "-" & Left(activesheetname, Len(activesheetname) - 3) & ".dxf"
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swDxfExportSplinesAsSplines, False
boolstatus = swApp.SetUserPreferenceIntegerValue(swUserPreferenceIntegerValue_e.swDxfMultiSheetOption, swDxfMultisheet_e.swDxfActiveSheetOnly)
Part.ClearSelection2 True
longstatus = Part.SaveAs3("S:\SWX\Preparation\" & txt2, 0, 0)
api_dxf1.jpg