4 Replies Latest reply on Sep 11, 2012 2:21 PM by Tim Webb

    Update supplier info on file data card that is checked in

    Andrew Dvorak

      Hi folks,


      Newbie here. I created a template that creates Supplier folders with the folder cards holding all the info about the suppliers. I was even able to create an SQL list of these supplier folders to add suppliers for my parts in a Combolist dropdown in the part file card. My problem is, I want to be able to add or remove suppliers from the part cards even after the part has been checked-in.


      My ultimate concept is that when we want a new supplier to quote or manufacture a part I can add them with the template and then add the supplier to the part data card, AND THEN... run some program that will share the appropriate part drawings (in PDF form) to the supplier folders.


      Currently, I have to check the part out, add the supplier and then check the part in. Is there any way around this?


      Also, how do I find the registry key to use to check if my SQL list needs updating? Currently I have it set to update every 1 min, but I don't really want that?




      Andy Dvorak

        • Re: Update supplier info on file data card that is checked in
          Michael Dekoning



          There may be a feature in EPDM 2013 that may help you with having to check out a file to update it. Watch for the SolidWorks 2013 launch this month.


          As to your second question, I have come up with a way to update a list whenever you create a folder using a template. In order to do this you will need to write a Dispatch script. Dispatch is a way to add some custom programming in EPDM without having to write an addin program using the API. There is a chapter in the Administration Guide and you should follow the procedure to add Dispatch to your vault.


          Add a new Action and name it as you wish. Unfortunately, there is not an activation for folder creation so we'll have to workaround this limitation. I chose to use "During Add", set the Path to %\temp.txt and chose "After the add operation." Next add a "Write registry value" command. Set the key to HKEY_CURRENT_USER\Software\SolidWorks\Applications\PDMWorks Enterprise\Vaults\MyVault\Supplier where MyVault is your actual vault's name. Set the value to %NameOfCurrentFolder%. Add a "Delete file" command to get rid of the temporary text file by setting the filename to %CurrentFolderPath%\temp.txt and checking "Also remove file from vault." Click through the OK buttons to save the script. Go to your List that uses the SQL query and enter the registry key above.


          So the only thing left to do is create the temp.txt file in the folder when you create a new supplier. Modify your template to add a temp.txt file in the folder that you create with the template. You can find out how to do this in the Administration Guide in the Templates chapter. If you have trouble, post back and I can assist you.



          EPDM 2012 SP2

          • Re: Update supplier info on file data card that is checked in
            Tim Webb

            Andrew, you may be a newbie according to the calendar but by your process thought, you are a pro. I like the way you think.


            I've done something similar by creating a loopback transition through a transition that leads right back to the state the file was in originally.


            I use dispatch, a runtime variable, & a combobox to intercept the transition and update the variable on the data card. Then use the transition to activate the addin to do the action on the file...like share with vendors, share with supply chain, notify vendors, notify Production, etc.


            Got a briefing on 2013 yesterday.


            • Variable updates without versions
            • Workflow editor zoom/pan
            • User picture & contact information from active directory
            • BOM updates


            Looking forward to these.


            Hope this helps.


            • Re: Update supplier info on file data card that is checked in
              Andrew Dvorak

              Both you gentlemen have given me much to work with, thanks. I won't be able to try either for a bit but I'll let you know when progress is made.


              Right now I have a related issue, and that is setting up the Supplier folders and permissions. We don't have the web server going yet so I am practicing with a Viewer license on another computer to represent the Suppliers. What I want, and can't seem to get, is a Supplier to see only their folder, and contents therein. I don't want them to know what other vendors we use.


              I have created this folder hierarchy:






              The PDFs that are shared to these folders are vaulted and non-revision managed, and the Supplier groups as a whole can Read file contents of vaulted files.


              First I gave Supplier1 user permission to Read File Contents to Supplier1 folder, and Supplier2 user to Supplier2 folder. With this set up Supplier1 can't get to the Supplier1 folder.


              I have to give both Suppliers permission to the top level Suppliers folder so they can navigate down to their folder and see their files. But then Supplier2 can see Supplier1


              Any ideas?

                • Re: Update supplier info on file data card that is checked in
                  Tim Webb

                  Hi Andrew


                  You are going down the right path. The way I have configured vendor access is to create a folder called "...\Vendor Access\" then a folder under this for each supplier with their name.


                  So the structure looks like this:


                  c:\_pdm_bizjet\Vendor Access >>> All vendors have Read and Show working versions permissions


                  c:\_pdm_bizjet\Vendor Access\Supplier 1 >>>Supplier 1 has Read and show, Supplier 2 does not


                  c:\_pdm_bizjet\Vendor Access\Supplier 2 >>>Supplier 2 has Read and show, Supplier 1 does not


                  and so on...


                  These folder permissions are managed individually and we keep records of the settings and reasons for the settings for historical purposes.


                  Hope this helps.