Hide Table of Contents
This example uses JSON objects. Do not try to run this example from the compiled help (chm). The browser that underpins compiled help is Microsoft Internet Explorer, which does not recognize JSON objects. To recreate this example in a supported web browser:
  1. Right-click in this page and select View source.
  2. Save the file as an HTML file.
  3. Open the HTML file in a supported web browser (Microsoft Edge, Google Chrome, or Mozilla Firefox).
This example authenticates credentials that you enter in a form, checks out a SOLIDWORKS file, modifies the file's datacard, creates a changeset, adds the modified file to the changeset, and checks in the changeset.
  1. Follow the Getting Started instructions.
  2. Ensure that a Quick Start data card exists. (A Quick Start data card for SOLIDWORKS files is optionally created during vault setup.)
  3. Ensure that at least one SOLIDWORKS file is checked into the root folder (folder Id = 1) of your vault.
  4. In the form below, enter the machine name where your web server is hosted, your web server's application port, a PDM Pro vault name, and your PDM Pro Admin credentials.
  5. Click Authenticate.
  6. Examine the Response text area for the JSON web token.
  7. Click Find IDs to get the IDs of all files in the root folder of your vault.
  8. Examine the Response text area and locate one SOLIDWORKS part's ID, version, and folder ID.
  9. Enter the file's version in the Version field, file ID in the FileID field, and the root folder ID in the FolderID field.
  10. Click Check out SOLIDWORKS file.
  11. Click Display the file's data card.
  12. Examine the Response text area for file's data card values.
  13. Inspect the first variable (Project Name). Note the VarId (48). Enter the 48 in the ID of Project Name variable field. Click Change variable value to change the Project Name value to PDM Pro Web API.
  14. Examine the Response text area.
  15. Click Create change set.
  16. Examine the Response text area for the changeset ID. Enter the changeset ID in the Changeset ID field.
  17. Click Add files to changeset.
  18. Click Check in file.

NOTES:

  • Errors are also printed to the Response text area.

Response


 



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:   Modify a Vault File's Datacard Variable Values Example (Javascript)
*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) 2022 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.