Hide Table of Contents
SaveSettings Method (ISldWorks)

Saves the specified SOLIDWORKS settings to the specified *.sldreg file.

.NET Syntax

Visual Basic (Declaration) 
Function SaveSettings( _
   ByVal FileName As System.String, _
   ByVal SystemOptions As System.Boolean, _
   ByVal ToolbarLayout As System.Integer, _
   ByVal KeyboardShortcuts As System.Boolean, _
   ByVal MouseGestures As System.Boolean, _
   ByVal MenuCustomization As System.Boolean, _
   ByVal SavedViews As System.Boolean _
) As System.Integer
Visual Basic (Usage) 
Dim instance As ISldWorks
Dim FileName As System.String
Dim SystemOptions As System.Boolean
Dim ToolbarLayout As System.Integer
Dim KeyboardShortcuts As System.Boolean
Dim MouseGestures As System.Boolean
Dim MenuCustomization As System.Boolean
Dim SavedViews As System.Boolean
Dim value As System.Integer
 
value = instance.SaveSettings(FileName, SystemOptions, ToolbarLayout, KeyboardShortcuts, MouseGestures, MenuCustomization, SavedViews)
C# 
System.int SaveSettings( 
   System.string FileName,
   System.bool SystemOptions,
   System.int ToolbarLayout,
   System.bool KeyboardShortcuts,
   System.bool MouseGestures,
   System.bool MenuCustomization,
   System.bool SavedViews
)
C++/CLI 
System.int SaveSettings( 
&   System.String^ FileName,
&   System.bool SystemOptions,
&   System.int ToolbarLayout,
&   System.bool KeyboardShortcuts,
&   System.bool MouseGestures,
&   System.bool MenuCustomization,
&   System.bool SavedViews
) 

Parameters

FileName
Full path and filename to which to save the settings (*.sldreg)
SystemOptions
True to save system options, false to not
ToolbarLayout
Toolbar layout as defined in swToolbarLayoutOption_e
KeyboardShortcuts
True to save keyboard shortcuts, false to not
MouseGestures
True to save mouse gestures, false to not
MenuCustomization
True to save menu customizations, false to not
SavedViews
True to save views, false to not

Return Value

Error code as defined in swSaveRestoreSettingsResults_e

Example

' VBA precondition:

' c:\temp exists

Dim swApp As SldWorks.SldWorks
Option Explicit
Sub main()
    Set swApp = Application.SldWorks

Dim boolStatus As Long
Dim path As String

path = "C:\temp\swSettings2.sldreg"
boolStatus = swApp.SaveSettings(path, True, swToolbarLayoutOption_e.swToolbarLayoutOption_AllToolbars, True, True, True, True)
End Sub

Remarks

For C++ only, specify all System.bool parameters using VARIANT_TRUE (-1) and VARIANT_FALSE (0).

 

See Also

Availability

SOLIDWORKS 2018 FCS, Revision Number 26.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   SaveSettings Method (ISldWorks)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2019 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.