save as macro
save as macro
(OP)
I need a macro to save as. Task scheduler doesn't save as .sat or .x_t which is 2 of the 4 file types I need. Anyone know where I can get one? Preferably free.
Grant
Certified SolidWorks Associate
SW2009 X64 SP 1.0
Dell Precision T5400
Nvidia Quadro FX 5600
Xeon 2.5GHz Quad Core, 4GB RAM
XP Pro X64 SP2.0






RE: save as macro
ht
-handleman, CSWP (The new, easy test)
RE: save as macro
Checking it out now.
Grant
Certified SolidWorks Associate
SW2009 X64 SP 1.0
Dell Precision T5400
Nvidia Quadro FX 5600
Xeon 2.5GHz Quad Core, 4GB RAM
XP Pro X64 SP2.0
RE: save as macro
Grant
Certified SolidWorks Associate
SW2009 X64 SP 1.0
Dell Precision T5400
Nvidia Quadro FX 5600
Xeon 2.5GHz Quad Core, 4GB RAM
XP Pro X64 SP2.0
RE: save as macro
Option Explicit
Dim swApp As Object
Dim swModel As Object
Dim sPartName As String
Dim sPartXT As String
Dim sPartSAT As String
Dim nErrors As Long
Dim nWarnings As Long
Dim bRet As Boolean
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
sPartName = Left(swModel.GetTitle, Len(swModel.GetTitle) - 7)
sPartXT = "C:\" & sPartName + ".x_t"
sPartSAT = "C:\" & sPartName + ".sat"
bRet = swModel.SaveAs4(sPartXT, swSaveAsCurrentVersion, swSaveAsOptions_Silent, nErrors, nWarnings)
bRet = swModel.SaveAs4(sPartSAT, swSaveAsCurrentVersion, swSaveAsOptions_Silent, nErrors, nWarnings)
End Sub
RE: save as macro
If the current open file, you could modify one of these and get it to work. The mod is typically easy, just change the code to a different file extension.
I can't access fcsuper's site right now... don't know why. http://sw.fcsuper.com/index.php
He has two macros that save drawings as pdf's. It is a simple change to make it work with parts and change to other file types.
Doing a batch process is another story. My guess is the anglesix batch process can be modified. I know Luke Malpass is quite active on the SolidWorks forums (over at solidworks.com) and he can probably tweak it for you.
-Dustin
Professional Engineer
Certified SolidWorks Professional
Certified COSMOSWorks Designer Specialist
Certified SolidWorks Advanced Sheet Metal Specialist
RE: save as macro
Grant
Certified SolidWorks Associate
SW2009 X64 SP 1.0
Dell Precision T5400
Nvidia Quadro FX 5600
Xeon 2.5GHz Quad Core, 4GB RAM
XP Pro X64 SP2.0
RE: save as macro
It's the free "Express" version that won't do the file type desired. The Express version saves 8 types. The full version does 40. I doubt he would add more file types to the free version when the pay version does them.
-handleman, CSWP (The new, easy test)
RE: save as macro
Have a look at DocExport on Lenny's site:
http
Sounds like it does just what you are looking for.
handleman,
agreed. I have not had the opportunity to play with BatchProcess. Thanks for the info.
-Dustin
Professional Engineer
Certified SolidWorks Professional
Certified COSMOSWorks Designer Specialist
Certified SolidWorks Advanced Sheet Metal Specialist
RE: save as macro
Matt Lorono
CAD Engineer/ECN Analyst
Silicon Valley, CA
Lorono's SolidWorks Resources
Co-moderator of Solidworks Yahoo! Group
and Mechnical.Engineering Yahoo! Group