Saves the specified named view of this model to SOLIDWORKS.
.NET Syntax
Visual Basic (Declaration) | |
---|
Function SaveViewToSolidworks( _
ByVal ViewName As System.String _
) As System.Boolean |
Visual Basic (Usage) | |
---|
Dim instance As IModelDocExtension
Dim ViewName As System.String
Dim value As System.Boolean
value = instance.SaveViewToSolidworks(ViewName) |
C# | |
---|
System.bool SaveViewToSolidworks(
System.string ViewName
) |
C++/CLI | |
---|
System.bool SaveViewToSolidworks(
& System.String^ ViewName
) |
Parameters
- ViewName
- Custom view name
Return Value
True if named view successfully saved, false if not
Example
'VBA
Option Explicit
Sub main()
Dim swApp As SldWorks.SldWorks
Set swApp = Application.SldWorks
Dim swModel As ModelDoc2
Set swModel = swApp.ActiveDoc
swModel.ViewRotateplusz
swModel.GraphicsRedraw2
Dim newName As String
newName = Format(Now, "YYYYMMDD-hhmmss")
Dim bResult As Boolean
swModel.NameView newName
bResult = swModel.Extension.SaveViewToSolidworks(newName)
Debug.Print "Saved view to SOLIDWORKS as """ & newName & """ == " & bResult
End Sub
Remarks
See Also
Availability
SOLIDWORKS 2023 FCS, Revision Number 31