Exports the specified drawing file to the specified SVG file.
.NET Syntax
Visual Basic (Declaration) | |
---|
Sub ExportToSvg2( _
const dsString& DrawingFilePath As System.String, _
const dsString& SvgFilePath As System.String, _
bool GrayScale As System.Boolean, _
bool* Success As System.Boolean _
) |
Parameters
- DrawingFilePath
- Full path name of drawing file
- SvgFilePath
- Full path name of SVG file
- GrayScale
- True to export grayscale, false to export color
- Success[out] or Return Value
- True if successful, false if not
Example
'VBA
Option Explicit
Sub main()
Dim dsApp As DraftSight.Application
'Connect to DraftSight
Set dsApp = GetObject(, "DraftSight.Application")
'Abort any command currently running in DraftSight
'to avoid nested commands
dsApp.AbortRunningCommand
Dim DrawingFilePath As String
DrawingFilePath = "drawing_file_path"
Dim SvgFilePath As String
SvgFilePath = "svg_file_path"
Dim bSuccess As Boolean
dsApp.ExportToSvg2 DrawingFilePath, SvgFilePath, True, bSuccess
If bSuccess = False Then
MsgBox "Failed to export " + DrawingFilePath + " document to SVG format."
End If
End Sub
See Also
Availability
DraftSight 2021 SP0