3 DS COMSOLIDWORKS Dassault Systmes Confidential Information 1242013

  • Slides: 24
Download presentation
3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 1 Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions www. xlmsolutions. com

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 2 What is an EPDM Task • Tasks are customizations that can be queued up and run on a separate computer / batch server • Printing / PDF Generation • Updating Files • Checking file integrity • The running of a task off loads the work to a server/computer so it does not take up time / resources of the individual’s computer • Customized tasks can be created to handle very specific requirements • Print / PDF based on Job ID (attribute in Data Card) • Watermark files • Print / PDF non Solid. Work type files

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 3 Out of the Box EPDM Tasks • There are out of the box tasks for EPDM • Print • Convert • Check • These tasks can be configured and customized

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 4 Out of the Box Tasks – EPDM 2013 Because EPDM / Solid. Works is now using VBA 7 – a different declaration is required

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 5 Customization of EPDM Tasks All aspects of the Task can be configured: • Setup • Configuration GUI Properties • On close of the configuration window of the Task • Initialization • RMB Menu / bring up a GUI • On close of the Task Initiates • Execution • The performing of the task • Task Details • The Details GUI of a the task

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 6 Configuring Out of the Box Task • Assign the task name • What Add-in to use • Who will execute it as • Should an input card be used • Number of retries • Minutes before failing

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 7 Execution Method • Determine where the task will run • A computer needs to be designated via the Task Host Configuration

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 8 Menu Command • Display the menu command to execute the task • The task could also be executed via a state transition

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 9 Task Specific Info (1/2) Specific info for the task • Print Task • Always use one specific printer • Provide a list of Printers for the user to pick • Based on the printer on the sheet size of the drawing • Convert Task • Convert Format • Conversion Options • Configuration Options

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 10 Task Specific Info (2/2) • Print • Page Size • Orientation • Margins • Header Info • Footer Info • Convert • Map Variables • Output paths • Reference links

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 11 Print Task - Files • Determine what files to print • Just the select file • The select file and all of its references i. e. children • Determine to use as built or latest • Where the log info will be written to • Advanced Configurations (Macro that performs this operation)

12 3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref.

12 3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 Advanced Scripting Options This is the Solid. Works Macro that does the work…

13 3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref.

13 3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 Permissions Configuring ho can perform the task

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 14 Notification • Who should notify when the task is successful • Who should notify when the task fails • What he message should say….

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 15 Writing your own task • Everything we just went through could be accomplished in our own task • Documentation on how to do this in in the EPDM API guide • Tasks need to be developed in COM based programing language i. e. VB. NET • The following areas of the task can be controlled • Setup – Controls the task set up options in the admin window • On close of Setup – What happens when the task admin window is closed • Running of the Tasks – Controls what the happens on the server when the task is executed • Task Launch – What happens when the user initiates the task on his client machine • Task Details – What the user sees when accesses the details about the task

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 16 Setting up your Environment • Reference in the EPDM Library • Set the import (simplify declarations) - Imports Edm. Lib • Add the implements line - Imports Edm. Lib • Write code for the two main add-In functions • Get. Add. Info – Information about the add-in • On. Cmd – Information about executing the Add-In Functions

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 17 On. Task. Setup This controls the setup behavior of the custom task 1. Add a Control to your project 2. Create a sub for the On. Task. Setup 1. Set where the control can run (menu / change state) 2. Menu command for the control 3. Associate GUI setup to task 3. Design the control 4. Set the Load Data and Store Data functions 1. (you will need to create these functions)

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 18 On. Task. Setup. Button This controls what happens then user hits okay or cancel at the end of the setup • Per the entered values, save them to EPDM • The task Properties object is used to store this information: IEdm. Task. Properties

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 19 On. Task. Launch This code executes on the client when the client initiates the task • For instance, prompt the user to change the PDF Location • This functions code will: 1. Get selected files 1. Store them in the task instance object 2. Populate GUI based on info in Task Setup 3. Show GUI 4. If Cancel exit task

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 20 On. Task. Launch. Button Controls what happens if a Data Card is presented and the user hits okay / cancel • Not used in this example

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 21 On. Task. Run The actual execution of the task • The code will perform the following actions: 1. Get selected files 1. Retrieve from the Task Instance Object 2. Do something with them (purpose of the task) 1. Create PDF for Excel Documents 2. Store info regarding the execution of the task 1. The Task Instance object can be used 3. Set the task status

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 22 On. Task. Details Allows the addition information / behavior present in the Detail information of the Task 1. Add a Control to your project 2. Create a sub for the On. Task. Details 3. Design the control 4. Set the Load Data and Store Data functions 1. You will need to create these functions 2. If can be read from the task instance object

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 23 Conclusion • Task can be a powerfully way to off load time / processor consuming tasks • Many of common requests can be done with the out of the box task • If the out of the box task, cannot handle it, the task can be programed to handle almost any customer requirement

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. :

3 DS. COM/SOLIDWORKS © Dassault Systèmes | Confidential Information | 1/24/2013 | ref. : 3 DS_Document_2012 24 Thank You!? Questions Marc Young x. LM Solutions, LLC. 248 -926 -5932 myoung@xlmsolutions. com Script example shown is available at: http: //www. xlmsolutions. com