TheTick
Mechanical
- Mar 5, 2003
- 10,194
I downloaded and attempted to run a VB macro to extract and display preview bitmaps from SW files. It does not work. I found many inconsistencies in the code.
Is anyone familiar with this sample? Downloaded from under the link titled "VBA Project to display bitmap previews". The downloaded file is SldWorks_GetPreviewBitmap.zip
I found some API calls that are not in the API documentation, or on the SolidWorksDeveloper.com site (wasted $25). Also a few basic syntax errors lead me to believe the code never ran.
1.) vConfName = swApp.GetConfigurationNames(txtFileName.Text)
I find no application object methods for this. It causes an error.
2.) Set swPreview = swApp.GetPreviewBitmap(txtFileName.Text, ddlConfig.Text)
ditto
3.) frmPreview.Show True
should read just frmPreview.Show
4.) uses Common Dialog object to open files. Works fine on computers that have VB installed, but not w/ VBA.
Any comments?
Good and evil: wrap them up and disguise it as people.
Is anyone familiar with this sample? Downloaded from under the link titled "VBA Project to display bitmap previews". The downloaded file is SldWorks_GetPreviewBitmap.zip
I found some API calls that are not in the API documentation, or on the SolidWorksDeveloper.com site (wasted $25). Also a few basic syntax errors lead me to believe the code never ran.
1.) vConfName = swApp.GetConfigurationNames(txtFileName.Text)
I find no application object methods for this. It causes an error.
2.) Set swPreview = swApp.GetPreviewBitmap(txtFileName.Text, ddlConfig.Text)
ditto
3.) frmPreview.Show True
should read just frmPreview.Show
4.) uses Common Dialog object to open files. Works fine on computers that have VB installed, but not w/ VBA.
Any comments?
Good and evil: wrap them up and disguise it as people.