Home Search

DriveWorks Pro 22
Create Image

Send Feedback

Create Image

The Create Image Generation Task will create an image of the Model or Drawing.

Properties

Property NameDescription
(Name)The unique name for this task.
Image ExtensionThe extension of the image, for example, png.
Image FolderThe folder to save the image to (leaving this blank will use the components folder).
Image NameThe file name of the image (leaving this blank will use the components name).
OverwriteTRUE to overwrite the file if it exists, FALSE to keep any existing file.
Specification IdThe Id of the Specification to associate the image with.
Zoom To FitTRUE to zoom to fit before creating the image.

Example

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 NameExample RuleExample ResultMeaning
Image Extension"jpg"jpgThe extension determining the kind of image file to be created.
Image Folder"C:\My Documents\Specifications\Images"C:\My Documents\Specifications\ImagesThe folder location to save the Created Image(s) to. Leaving this property blank will result in the components folder being used.
Image Name"Assembly "&DWSpecificationIdAssembly 9999The file name of the image. Leaving this blank will result in the component name being used.
OverwriteFALSEFALSEFALSE will keep any existing file. TRUE will overwrite the file if it already exists.
Specification IdDWSpecificationIdDWSpecificationIdThe Id of the Specification to associate the created image with.
Zoom To FitTRUETRUEWill zoom the model to fit before the image is created.

Generation Sequence

This Task can be added to the following Generation Sequence(s):

  • Pre Drive (will be run before the Main Drive Sequence)
  • Post Drive (will be run after the Main Drive Sequence)
  • Pre Close (will be run before the SOLIDWORKS file is closed)

Warnings and Errors

Issues encountered during the File, Save operation are reported in Model Insight and the Model Generation Report.

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.

Reporting Level

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.

Additional Resources

MyDriveWorks - Tech Tips

Create Model Image

This Project demonstrates how to create images of generated Assemblies, Parts or Drawings using Generation Tasks.