Image Capture Macro
Image Capture Macro
(OP)
I am recording a macro that:
1. Sets the background to white
2. Image capture
3. Sets the background back to the original color
I am hard coding in the background color so this is not mean to be elegant at all. When I record the image capture does not make it into the macro. Does anyone know the command? I figure someone else has done this already so if you have code that already works and are willing to share that would be great. Below is my code. Thanks
Rob Stupplebeen
' ******************************************************************************
' C:\DOCUME~1\stupplrk\LOCALS~1\Temp\swx2964\Macro1.swb - macro recorded on 01/30/09 by stupplrk
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 16777215
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 13813955
End Sub
1. Sets the background to white
2. Image capture
3. Sets the background back to the original color
I am hard coding in the background color so this is not mean to be elegant at all. When I record the image capture does not make it into the macro. Does anyone know the command? I figure someone else has done this already so if you have code that already works and are willing to share that would be great. Below is my code. Thanks
Rob Stupplebeen
' ******************************************************************************
' C:\DOCUME~1\stupplrk\LOCALS~1\Temp\swx2964\Macro1.swb - macro recorded on 01/30/09 by stupplrk
' ******************************************************************************
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 16777215
swApp.SetUserPreferenceIntegerValue swSystemColorsViewportBackground, 13813955
End Sub






RE: Image Capture 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
RE: Image Capture Macro
RE: Image Capture Macro
http://www.EsoxRepublic.com-SolidWorks API VB programming help