I've used the macro feature a couple of times before but never got into programming with code.
I have created a macro that rotates the part to an isometric view, zooms it to fit the screen and saves it to a specific location.
' **************************************************************************** ** ' C:\DOCUME~1\lucas\LOCALS~1\Temp\swx1772\Macro1.swb - macro recorded on 08/26/05 by lucas ' **************************************************************************** ** Dim swApp As Object Dim Part As Object Dim boolstatus As Boolean Dim longstatus As Long, longwarnings As Long Dim FeatureData As Object Dim Feature As Object Dim Component As Object Sub main()Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc Part.ShowNamedView2 "*Isometric", 7 Part.ViewZoomtofit2 Part.SaveAs2 "E:\Lucas\Seradex Items\Part Pictures\11115.JPG", 0, True, False End Sub
As you can see, the part is always saved under the name "11115.JPG". I would like to change it so that the file name minus the ".SLDPRT" is used.
Can anyone help me out?
Thanks