NOTE: If using the .NET Framework 4.0 primary interop assembly provided with SolidWorks Enterprise PDM, see Using .NET Framework 4.0 in Stand-alone Applications.

1. Start Microsoft Visual Studio 2010.
'  2. Click File > New > Project > Visual Basic > Windows Forms Application.
'  3. Type the name of your project in Name.
'  4. Click Browse and navigate to the folder where to create the project.
'  5. Click OK. 
'  6. Create a form similar to the form shown above with the following controls: 
'     a. Label1 (label control with text, "Select vault:")
'     b. comboVault (combo box)
'     c. buttonLogIn (button with text, "Log In")
'     d. Label2 (label with text, "Users")
'     e. buttonRefresh (button with text, "Refresh Permissions")
'     f. listViewUsers (list view control)
'        ColumnHeader1 (ID)
'        ColumnHeader2 (Name)
'        ColumnHeader3 (Folder ID)
'        ColumnHeader7 (Folder)
'        ColumnHeader8 (Folder Permissions)
'     g. Label3 (label with text, "Groups")
'     h. listViewGroups (list view control)
'        ColumnHeader4 (ID)
'        ColumnHeader5 (Name)
'        ColumnHeader6 (Folder ID)
'        ColumnHeader9 (Folder)
'        ColumnHeader10 (Folder Permissions)
'     i. listViewPermissions (list view control)
'     j. checkboxReverseOrder (check box with text, "Reverse Order")
'     k. buttonApply (button with text, "Apply Permissions")
'  7. Replace the code in Form1.vb with this code.
'  8. Replace the code in Form1.Designer.vb with this code.
'  9. Add EPDM.Interop.epdm.dll as a reference (right-click the project
'     name in the Solution Explorer, click Add Reference, click Assemblies > Framework in the
'     left-side panel, browse to the top folder of your SolidWorks Enterprise PDM installation,
'     locate and click EPDM.Interop.epdm.dll, click Open, click Add, and click Close).
' 10. Right-click References > EPDM.Interop.epdm, click Properties, and set 
'     Embed Interop Types to False to handle methods 
'     that pass arrays of structures.
' 11. Click Debug > Start Debugging or press F5.
'
' Postconditions: 
' 1. In the Form1 dialog, select a vault and click Log In.
'    Wait for the application to populate the Users and Groups list boxes.
' 2. Click permissions in the list box located left of the Reverse Order check box.
' 3. Optionally select the Reverse Order check box.
' 4. Select the check boxes in front of the users and folders to which to assign permissions.
' 5. Click Apply Permissions.
'    Wait for the application to populate the Users list.
'    The folder permissions are updated for the selected users.
' 6. Select the check boxes in front of the groups and folders to which to assign permissions.
' 7. Click Apply Permissions.
'    Wait for the application to populate the Groups list.
'    The folder permissions are updated for the selected groups.
NOTE: If using the .NET Framework 4.0 primary interop assembly provided with SolidWorks Enterprise PDM, see Using .NET Framework 4.0 in Stand-alone Applications.
vnote