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 will need:
  • SOLIDWORKS PDM Professional; the supported versions are:

    Version

    v 2019 and later + WebAPI

    * v2016 - 2018 + WebAPI

    * You must request the WebAPI directly from SOLIDWORKS support PDM Professional versions prior to 2019.

    If you are using 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 a 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. Launch 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. Then enter the login / password of the SOLIDWORKS PDM Professional installation user.
    5. Click OK and restart the service.

To change the webservice 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:

    Don't forget to 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. Launch 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 the Group name field.



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



  6. Click State Permissions on the left, 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 the popup window and click OK.



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



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



  12. Click OK.



The user ‘OnePart’ can now be used to configure the connector in the Exalead CloudView Administration Console or OnePart Console.

Creating the SOLIDWORKS PDM Professional 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. Create your connector in the OnePart Console as detailed in To add a new source.
  2. Set the Connectivity fields.
  3. Click Connect to validate the connectivity between the Connector and your source.
  4. Optional, configure the Import Scope in Selected Folders.
  5. Click OK.

    This will save and deploy your new connector.

(optional) To configure the Advanced options

  1. In the Administration Console Home page, select the SOLIDWORKS PDM connector from the Connectors list.
  2. Configure the Advanced options.
  3. Click Apply at the top of your Administration Console screen.

This will save and deploy your new connector configuration.

To add a connector targeting the consolidation server

If you did NOT use the OnePart Console to add your sources, then you must manually configure the connector to target the consolidation server in the Administration Console as follows.

  1. In Deployment > Push to PAPI server, select consolidation server cs_onepart
  2. In Configuration > PushAPI filters, click Add itemto configure:
    1. PushAPI filter type: Push API Filters Runner
    2. Use Push API filter from connector: OnePartPAPIFilters
    3. Push API filters config key: PushApiFilters (default)
    4. Enable this PushAPI filter: yes

  3. Click Apply at the top of your Administration Console screen.

    Note: The OnePartPAPIFilters connector contains PAPI Filters that are required for any connector deployed in OnePart. Any connector deployed without these PAPI Filters will not be supported.

This will save and deploy your new connector configuration.

Connectivity fields

Configuration

Description

Name

The name of the new source. This name can not be modified once you’ve saved.

Retrieve document security

When this option is enabled, the connector also retrieves individual document security information ("ACL") from the source, and OnePart 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 a Web Service.

Webservice Port

The webservice port. See To install a Web Service.

Vault

SOLIDWORKS PDM Professional database which will 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; choose 2019 for PDM 2019 and 2018 for prior PDM versions.

Import Scope

The connector’s import scope is set up through the 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

  • set rules on folder paths to exclude or include

  • include or exclude file extensions

#

Configuration Parameters (admin-ui fields)

Enabled

Description

Select Folders > Include

-

Specifies full path that you want to crawl or fetch. All child folders will be included for given path. Path starts with vault name, followed by foldername. e.g. <vault name>\\folder1\\subfolder1

Select Folders > Ignore folder

(Exclude Rules)

-

Specifies full path that you do not want to crawl or fetch. All child folders will be excluded for given path. Path starts with vault name, followed by foldername. e.g. <vault name>\\folder1\\subfolder1

Get latest version only

(Latest version Only)

true

This setting will get latest version of objects from the Vault.

Skip files over

(Max File Size)

-

Maximum file size to be crawled. Files greater than this size will be ignored while importing.

Include extension

(File Extensions)

false

Specifies file extensions that will be excluded or included during the crawl

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 will check 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 will happen only if "Detect Delection" and "Enable document security" are both unchecked

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. Typical value is 5.

Creating the SOLIDWORKS PDM security source

A key thing to remember with OnePart is that you must ALWAYS have a Multi-security source named app_login. This name maintains the link for the security enabled on both Exalead CloudView and the OnePart UI’s.

Before you begin: If you must use the Exalead CloudView Administration Console then you must:
  1. use the security source type called SOLIDWORKS PDM.
  2. first create the security source manually in the Administration Console and
  3. add it as a source to the app_login configuration.

To add the security source

We highly recommend that you use the OnePart Console to create your sources. OnePart automatically configures the security and Consolidation Server requirements. As of R2016x R1, OnePart no longer requires the SDC Connector for consolidation needs. If necessary, you can configure the advanced options in the Administration Console.

  1. In the Administration Console, go to the Security Sources page.
  2. Click on Add security source and create the new security source as follows:
    • in Name: Enter a name for the security source
    • in Type: Select the security source you require. It generally has the same name as the connector.
  3. Click on 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 Security source's configuration page, you must fill in the Config fields with your SOLIDWORKS PDM Professional server information. See the Connectivity fields
  2. You can test connectivity by clicking on the Test button.
  3. Click Apply at the top of the Administration Console screen.
  4. Next step is to add your security source to the app_login multi-security 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 a Web Service.

Webservice Port

The webservice port.

See the To install a Web Service.

Vault

SOLIDWORKS PDM Professional database which will 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