SOLIDWORKS Network Licensing allows the licenses your company owns to float between any client machines within your organization. What if you want more control over who can access certain features? You’re in luck, the SolidNetwork License (SNL) Manager can be further controlled by creating an options file.
Before we get started, an option file requires an SNL Manager to be installed and have access to the machine it’s installed on. To make the example easier to follow, I will highlight the code going into the options file in Blue and the syntax for each statement will be highlighted in Red. Now let’s take a closer look at implementing an options file. For discussion in this blog post, let’s assume that we have 6 SOLIDWORKS Premium, 3 SOLIDWORKS Standard and 1 Simulation Premium licenses.
First, we need to create groups to represent the different users within our organization. The first group will be called “Engineering” and needs access to SOLIDWORKS Premium.
The second group will be “Intern” and these users will only be allowed to access SOLIDWORKS Standard. Also, they will not be allowed to borrow a license.
Last we have our “Simulation” group.
Options files can be created in any plain-text editor. That means Notepad, TextEdit, or any word processor which can save a file as plain text. Open a new document and save it with the name “sw_d.opt”.
We are going to start by defining the groups. The syntax for creating a group is – GROUP <Group Name><Group Members>. <Group Name> can be any name you choose, but the <Group Members> are the Windows user name. See the example code below:
GROUP Engineering Jim Franco Jesse Derek Sara
GROUP Intern John Dave Sam
GROUP Simulation Sasi
Now that we have our groups defined, let’s limit our “Intern” group to just SOLIDWORKS Standard. To restrict a group from accessing a specific feature, we need to use the EXCLUDEstatement. The syntax for this statement is EXCLUDE <Feature><Type><One item of that type>. Implemented into our example, our code will look like this :
EXCLUDE swofficepremium GROUP Intern
Next we need to limit the “Engineering” and “Intern” groups from using the Simulation Premium license. This can be accomplished using an EXCLUDE statement again, however, I will take this opportunity to show you another function. We can use the RESERVE statement to reserve the license for anyone listed under the “Simulation” group. The syntax for the RESERVE statement is RESERVE <Quantity><Feature><Type><One item of that type>. If you want to reserve all the licenses you do not need to specify a quantity. Our coded reserve statement will look like this:
RESERVE cae-cwadvpro GROUP Simulation
Next, let’s use the EXCLUDE_BORROW statement to prevent our “Intern” group from borrowing a SOLIDWORKS Standard license. The syntax for the EXCLUDE_BORROW statement is – EXCLUDE_BORROW <Feature><Type><One item of that type>
EXCLUDE_BORROW solidworks GROUP Intern
Lastly, we can use the TIMEOUTALL statement to return any inactive licenses after a preset amount of time. The default timeout is 2 hours, so inactivity for 2 hours will free up a license. We want to set our timeout value to 30 minutes or 1800 seconds. The syntax for this is – TIMEOUTALL <Time in seconds>
Here is what our finished options file looks like:
Now that we have converted our license restrictions to code form, we need to save the sw_d.opt. You can save it to a location of your choice on the server or you can save it to the default server location of C:\Program Files (x86)\SolidWorks Corp\SolidNetWork License Manager\licenses.
The steps below will need to be performed on the server in order to get the SNL to use the options file we just created.
- Open the SolidNetwork License Manager
- On the “Server Administration” tab select “Modify”
- Choose “Activate/Reactivate” (Next)
- On the Next Screen check “Options File” and browse to the location we saved the sw_d.opt (Next)
- Select all products and choose the “Automatically over the internet” option (Next)
- Click Finish
To verify that the SNL Manager is using the newly created options file, we can choose “View Log” on the “Server Administration” tab. We are looking for a line that says (SW_D) Using options file: “Path to sw_d.opt” This line should be near the top of the log. I find it easiest to search the log for “sw_d.opt”.
That’s it! You have finished creating an options file. The example we used is just one of many different ways to use an options file. For more information about the statements used in this example, as well as others, please check out pg. 139 of the Flex LM user guide. On a machine where the SNL is installed, the guide is located at C:\Program Files (x86)\SolidWorks Corp\SolidNetWork License Manager\Docs\flexuser\licencingenduserguide.pdf or it can be downloaded from SOLIDWORKS here.
Below is some keywords and product descriptions commonly used when creating options files.