Dispatch Question...

I'm not sure if PDM API questions belong in the PDM forum orthe API forum...

I have created a dispatch action that copies a file from folder toanother when a file is added to the vault... and it works fine...but does anyone know if there is a way to have it only copy thatfile if a variable on the card of the file being created is"Yes"??SolidworksSolidworks Pdm enterprise Pdm
Answers 1
SF
SF 2008-11-06 Best Answer
Ok... I figured this out if anyone else is interested... WhatI'm doing is if the variable on the card says "Yes", then I'mpopping up a message box to confirm if they want a checklist, I'malso asking for a Job Number and renaming the checklist toJobNumber.doc and checking in the file after it's copied... Youhave to set the dispatch actions like this to do this:

1. For All Documents Block START
2. Jump If = Yes NO_CASE THEN GOTO ShowYesNoMessageBox
3. Jump If %TopLevelDrawing%=No NO_CASE THEN GOTO EndProgram
4. Label ShowYesNoMessageBox
5. Yes-No Message Box CheckListNeeded = YES || NO
6. Jump If %CheckListNeeded%=Yes NO_CASE THEN GOTO CopyFile
7. Jump If %CheckListNeeded%=No NO_CASE THEN GOTO EndProgram
8. Label CopyFile
9. Edit Box Job Number
10. Get File %RootFolderPath%\CheckLists\DrumEngineerChecklist.doc
11. Copy File %RootFolderPath%\CheckLists\DrumEngineerChecklist.doc=> %CurrentFolderPath%\
12. Rename File %CurrentFolderPath%\DrumEngineerChecklist.doc ->%JobNumber%.doc
13. Check in file %CurrentFolderPath%\%JobNumber%.doc
14. OK MessageBox Checklist was copied to %NameOfCurrentFolder%successfully!!
15. Label End Program
16. End for all documents Block END