Creates a snippet from the current selection.

Syntax

Function CreateSnippet(_       ByVal fileName As String, _       ByVal selectionOnlyFlag As Boolean, _       ByVal zoomFactor As Double) _       As String

Parameters

fileName—The file name to save the image. The extension must be .png. If no extension is provided, .png is appended. If the wrong extension is provided, it is replaced with .png.

selectionOnlyFlag—If false the whole sheet is added to the snippet. Since selecting objects is not supported by the API, this flag is ignored and the whole sheet is always added to the snippet.

zoomFactor—The zoom factor (%) to be used for the snippet image. Enter a positive number between from 10 to 1000 inclusive.

Remarks

Returns the fully qualified path of the resulting saved snippet, including file extension. If the save fails, the returned string is blank.

Example

Dim ret As String
ret=circuit.CreateSnippet("C:\temp\snippet.png", false, 100.0)