The Create Image Generation Task will create an image of the Model or Drawing.
|(Name)||The unique name for this task.|
|Image Extension||The extension of the image, for example, png.|
|Image Folder||The folder to save the image to (leaving this blank will use the components folder).|
|Image Name||The file name of the image (leaving this blank will use the components name).|
|Overwrite||TRUE to overwrite the file if it exists, FALSE to keep any existing file.|
|Specification Id||The Id of the Specification to associate the image with.|
|Zoom To Fit||TRUE to zoom to fit before creating the image.|
When this task is added, the properties are both static and dynamic by default.
See How To: Change A Static Property To A Dynamic Property to enable rules to be built on these properties.
|Property Name||Example Rule||Example Result||Meaning|
|Image Extension||"jpg"||jpg||The extension determining the kind of image file to be created.|
|Image Folder||"C:\My Documents\Specifications\Images"||C:\My Documents\Specifications\Images||The folder location to save the Created Image(s) to. Leaving this property blank will result in the components folder being used.|
|Image Name||"Assembly "&DWSpecificationId||Assembly 9999||The file name of the image. Leaving this blank will result in the component name being used.|
|Overwrite||FALSE||FALSE||FALSE will keep any existing file. TRUE will overwrite the file if it already exists.|
|Specification Id||DWSpecificationId||DWSpecificationId||The Id of the Specification to associate the created image with.|
|Zoom To Fit||TRUE||TRUE||Will zoom the model to fit before the image is created.|
This Task can be added to the following Generation Sequence(s):
Messages beginning with "swFileSaveWarning_" do not cause the File, Save operation to fail. These are warnings that could affect the accuracy of the file being outputted.
Warning status are displayed in orange in the report.
Ensure the Reporting Level is set to a minimum of Normal, to allow warnings to be reported.
Messages displayed with the status red in the report are errors that caused the File, Save operation to fail.
In most cases the error message is understandable, however the article SOLIDWORKS API Help - swFileSaveError_e Enumeration may give more insight.
DriveWorks Tech Tips Portal
Create Image Generation Task
This Tech Tip demonstrates how to create images of generated assemblies, parts or drawings using generation tasks.