×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Image Capture Macro

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

RE: Image Capture Macro

What command are you using for image capture?

RE: Image Capture Macro

Why not just use "Save As" with JPEG file-type to capture your image?

Quote (SWhelp):

Retval = ModelDocExtension.SaveAs ( Name, Version, Options, ExportData, Errors, Warnings)

New name of the document' the file extension indicates any conversion that should be performed (for example, Part1.igs to save to IGES)

batHonesty may be the best policy, but insanity is a better defense.bat
http://www.EsoxRepublic.com-SolidWorks API VB programming help

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources