SOLIDWORKS Technical Blog on Dispatch Functionalities

call
BeaconIndia Jul 17th, 2019

SolidWorks PDM system contains a tool to tweak the functions from PDM to modify based on the user requirements called as Dispatch Tool.  The Dispatch Tool allows non-programmers to create basic programs within PDM without having to learn advanced programming language.

This article highlights the capabilities of the Dispatch Tool through an example that renames a file with the information contained on the file’s Data Card. Many a times various manufacturing companies need to provide a unique serial number for the files created and those numbers should be as a file name and not just on the data card. Dispatch helps us to achieve the outcome by developing a basic program, Scripts which are easy to generate. We will be developing a script for a data card variable to generate as a file name.

A data card with unique serial number generation logic is shown below. The serial number is generated based on the input provided in the data cards variables: Adapter, Machining Type, Paper Type, Pump Type, Serial Number.

A Formula has been provided on the New Drawing no. Variable which formulates the variables into a unique serial number.

To program the dispatch function to give the File name as a New Drawing No. Variable:

  1. Open the PDM Administration Tool, Right click on the vault and click Import, navigate through this C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS PDM\Default Data  and select Dispatch Add-In.

2. Open the Dispatch Tool Click on Administrative actions :

3. Click on add, to add a new script and give a suitable description:

4. Under Edit action, Click on add and under command click on For all documents.

5. For next step, Click on add, Under Commands, Select Move or Rename Files, on a path to Rename or Move select %PathToSelectedFile%

6. On the New path or Filename, Tab select the variable you want to impose as filename, in this case, select variable New Drawing No.

7. Click On add Select End for all Documents.

Below is a detailed list and Logic of each line in the code: –

  • Block Start – For all documents:  This lets the program know that this command is for documents only. It is not for BOMs, Items, or Folders. This also allows the user to multi-select several files and apply the command to them at one time.
  • Move/Rename: This line takes the path of the selected file, minus the extension, and renames it to a Dispatch Variable called “New Drawing No.”
  • End For all Documents: Ends Command for all Documents.

After saving the Dispatch tool you can right-click on the file and by selecting Dispatch > Rename the Drawing name will be changed according to your variable.

The given article illustrates a simple function to rename files with some basic programming and scripting we can build various Dispatch to cater for the different functions in SolidWorks PDM.

We Urge You To Call Us For Any Doubts & Clarifications That You May Have. We Are Eager to Talk To You

Call Us: +91 7406663589

Karnataka & Goa

Chennai

Mumbai

Pune

Ahmedabad

For SOLIDWORKS Product Enquiry Contact:

AUTHOR: BeaconIndia

How useful was this?

Click on a star below to rate us out of 5 stars

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

Your email address will not be published. Required fields are marked *

NEWSLETTER SIGN-UP