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?
Thanks,
Andy Dvorak
Andy,
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.
Mike
EPDM 2012 SP2