Setting up the SOLIDWORKS PDM Professional Web API Connector

This task shows you how to:

Installing and Configuring the Connector

To be performed directly on the machine with the SOLIDWORKS PDM Professional client installed.

Before you begin: You need a valid version of SOLIDWORKS PDM Professional. The supported versions are:
Version
v 2019 and later + WebAPI
* v2016 - 2018 + WebAPI

For PDM Professional versions before 2019, you must request the WebAPI directly from SOLIDWORKS support.

For PDM Professional 2019, refer to SOLIDWORKS PDM Help: Administering Web API servers

If you are using older versions of SOLIDWORKS PDM Professional:

  • a local SOLIDWORKS PDM Professional view must be created on each Vault that needs to connect to OnePart
  • the WebAPI package must be requested directly from SOLIDWORKS support

To Install the Web Service

  1. Unzip the OnePart Connector zip file to access the Web Service package.
  2. Unzip the PDM-WebAPIServicePackage-version.zip file to a new folder on your server called PDMServicePackage.

    Note: This folder must not be deleted; after installation it is used at runtime.

  3. Start a new cmd.exe with administrator rights.
  4. Change to the PDMServicePackage directory on your SOLIDWORKS PDM Professional server.
  5. Run Install.bat to create a new Windows Service named SolidWorksPdmWebApiServiceHost.
  6. This service runs a Web Service that listens by default on the 16000 port. If you need to change this port, see below.
  7. Go to your Windows Services Console (not required for PDM Professional 2019):
    1. Double-click SolidWorksPdmWebApiServiceHost.
    2. Click the Log On tab.
    3. Select the option This account instead of Local System account.
    4. Enter the login / password of the SOLIDWORKS PDM Professional installation user.
    5. Click OK and restart the service.

To Change the Web Service Port (Optional)

  1. Edit the file PDMServicePackage\configuration\HostSettings.xml.
  2. At line 2 change the value:

    HostBaseUri="http://localhost:16000/" to

    HostBaseUri="http://localhost:<YOUR NEW PORT>"

  3. Restart the SolidWorksPdmWebApiServiceHost service after changing the port.

To Change the Log Level

Context:

Support may ask you to change the log level of this service.

  1. Edit the file PDMServicePackage\configuration\log4net-prod.config.
  2. At line 8, change the value:

    <levelMin value="INFO" /> to

    <levelMin value="DEBUG" /> to switch to debug mode.

    Note:

    Switch back to INFO because DEBUG level may cause performance issues.

  3. Restart the SolidWorksPdmWebApiServiceHost service after changing the log level value.

To Uninstall the Webservice

  1. Start a new cmd.exe with administrator rights.
  2. Go to your PDMServicePackage folder on your server.
  3. Run Install.bat -u

SOLIDWORKS PDM Professional User Configuration

To add a User to SOLIDWORKS PDM Professional, follow the procedure below.

Before you begin: NETVIBES recommends that you crawl with a user who has:
  1. Open SOLIDWORKS PDM Administration.
  2. Expand the vault that you want to crawl.
  3. Right-click Groups and select New Group.



  4. Enter OnePart in Group name.



  5. Click Folder Permissions, click the Vault, and select all Folder Permissions.



  6. Click State Permissions, select all states one by one for each Workflow and assign all permissions to it.

    For example, the workflow state Approved



    For example, the workflow state Changing Pending Approval

  7. Click OK to create the Group.
  8. Right-click Users and select New User.



  9. Enter the new user’s Login name and click OK.



  10. Click New User and enter the user details: Login name and Password and click Next.



  11. Click Groups and select OnePart (group that we have created above with all permissions) and then click OK.



  12. Click OK.



Result: The OnePart user can now be used to configure the connector in the Administration Console.

Creating the SOLIDWORKS PDM Web API Connector

In the connector's configuration page, you need to fill in the fields with the values that correspond to your SOLIDWORKS PDM Professional server configuration.

  1. Open the Administration Console.
  2. Click Connectors and then click Add connector.
  3. Complete the fields as follows:
    1. In Name, enter a descriptive name such as SW-PDM.

      The connector name cannot be changed afterward. This name is also used as a tag name in the UI.

      Important: The connector name cannot be changed afterward. This name is also used as a tag name in the UI.

    2. For Creation mode, select copy.
    3. For Connector to copy, select PDM_Template.
    4. Click Accept.
      The SW-PDM connector page is created.
  4. Enter the Web Service and vault details, see Connectivity Fields.
  5. Click Connect to validate the connectivity between the connector and your source.
  6. Optional, configure the Import Scope.
  7. Click Apply.

    This saves and deploys your new connector.

(Optional) To Configure the Advanced options

You can configure advanced options in the Administration Console.

  1. Click Connectors and select the SOLIDWORKS PDM Web API connector that you created.
  2. Configure the Advanced options.
  3. Click Apply.

Result: This saves and deploys your new connector configuration.

(Optional) To Target the Consolidation Server

If you have used the PDM_Template to create your connector, you can skip this procedure. You can configure the connector to target the consolidation server as follows.

Note: The PDM_Template includes convert_filters containing PAPI Filters that are required for any connector deployed in OnePart. OnePart only supports connectors deployed with these PAPI filters.

  1. Click Connectors and select the SOLIDWORKS PDM Web API connector that you created.
  2. In Deployment > Push to PAPI server, select consolidation server cs0
  3. In Configuration > PushAPI filters, configure:
    1. PushAPI filter type: Push API Filters Runner
    2. Use Push API filter from connector: convert_filters
    3. Enable this PushAPI filter: yes
    4. Push API filters config key: PushApiFilters (default)
  4. Click Apply.
    This saves and deploys your new connector configuration.

Connectivity Fields

Configuration Description
Name The name of the new source. This name cannot be modified once you have saved.
Retrieve document security When this option is enabled, the connector retrieves individual document security information ("ACL") from the source, and only shows each document to authorized users. With this option disabled, indexing is faster, and all documents are public or subject to App Security.
Webservice Host The host name where the SOLIDWORKS PDM webservice is deployed.

This is used for the “Open in source” button in the OnePart UI.

See how To Install the Web Service.

Webservice Port The webservice port. See To Install the Web Service.
Vault SOLIDWORKS PDM Professional database to be crawled.
Login User Name for SOLIDWORKS PDM Professional. This user account must be configured as described above.
Password

Password for SOLIDWORKS PDM Professional account.

WebAPI URL SOLIDWORKS PDM Professional WebAPI endpoint URL
WebAPI Version SOLIDWORKS PDM Professional WebAPI version;
  • 2020 for PDM Pro 2020
  • 2019 for PDM Pro 2019
  • 2018 for prior PDM versions

Import Scope

The SOLIDWORKS PDM Web API import scope is specify up through the connector configuration. By default, all paths and file extensions are included and only the latest versions of objects are retrieved. In the connector indexing scope, you can also:

  • import all versions of a file

  • Specify rules on folder paths to exclude or include

  • include or exclude file extensions

# Configuration Parameters Enabled Description
Latest version only true This gets the latest version of objects from the Vault.

Folder Paths > Include Rules

- Specifies full path that you want to crawl or fetch. All child folders are included for given path. The path starts with vault name, followed by folder name. e.g., <vault name>\\folder1\\subfolder1
Folder Paths > Exclude Rules - Specifies full path that you do not want to crawl or fetch. All child folders are excluded for a given path. The path starts with vault name, followed by folder name. e.g., <vault name>\\folder1\\subfolder1
File Extensions false Specifies file extensions to be excluded or included during the crawl
Max File Size (obsolete) - Maximum file size to be crawled. Files greater than this size are ignored while importing.

Advanced options

Advanced options only available in the Administration Console’s connector configuration More options.

Context:

Configuration

Description

Detect Deletion This setting detects deleted objects from SOLIDWORKS PDM. By default, the connector checks for deleted objects.

In case of large databases where the “detect deletion” operation is costly. It is recommended to disable this setting.

Note: the performance optimization happens only if "Detect Deletion" and "Enable document security" are both disabled.

Maximum number of retries Maximum number of times document retrieval is retried in case of failure.
Maximum stored faults Maximum number of document failures to be stored and retried in subsequent scans.
Number of indexing threads Maximum threads in running state for importing. The typical value is 5.

Creating the SOLIDWORKS PDM Web API security Source

A key thing to remember with OnePart is that you must ALWAYS have a Multisecurity source named app_login. This name maintains the link for the security enabled on both Exalead CloudView and the OnePart UIs. The workflow in the Exalead CloudView Administration Console is:

  1. Create the new SOLIDWORKS PDM Web API security source.
  2. Configure the new security source.
  3. Add it as a source to the app_login multisecurity configuration.

To Add the Security Source

  1. In the Administration Console, go to Security Sources.
  2. Click Add security source to create the new security source as follows:
    • in Name: Enter a name for the security source such as SW-PDM
    • in Type: Select the SOLIDWORKS PDM Web API security source
  3. Click Accept.
  4. You are now ready to configure the new security source.

To Configure the Security Source

You need to configure the security source to view your SOLIDWORKS PDM items in OnePart.

  1. In the SOLIDWORKS PDM Web API configuration page, complete the Config fields with your SOLIDWORKS PDM Professional server information. See the Connectivity Fields
  2. To test the connectivity, click Test.
  3. Click Apply to save the configurations.
  4. Next step is to add your security source to the app_login multisecurity source configuration. See Configure the Multi-Security Source.

Connectivity Fields

The security source connectivity fields are detailed below.

Configuration

Description

Webservice Host

The host name where the SOLIDWORKS PDM Professional webservice is deployed.

See the To Install the Web Service.

Webservice Port

The webservice port.

See the To Install the Web Service.

Vault

SOLIDWORKS PDM Professional database to be crawled.

Login

User Name for SOLIDWORKS PDM Professional. This user account must have super user privileges

Password

Password for SOLIDWORKS PDM Professional account.

WebAPI URL

SOLIDWORKS PDM Professional WebAPI endpoint URL