I would really like to be able to deny transition of a part to a specific state without having a drw file. Is this possible to do?
Thank you in advance
I have created a sample dispatch for you.
It checks if there is a drawing file with same name in same location. If not it gives a warning and cancel operation.
It is triggered by workflow
Here is video and I attached dispatch
forum - YouTube
If PDM Profesional - me seems it it is possible to try to make by means of Dispatch.
Also can be still possible to try to configure conditions in Workflow.
Simple answer - No.
As Sam Sam said; you can do that with dispatch.
Dispatch will be triggered by workflow. in "Jump" function you can chech if a file is exist or not. So you can check if there is a drawing with same name in same location with part/assembly. İf not you can use "Cancel PDM Command" function to cancel and you can give user a message.
Ok. I tried to do this, but I cant make it work. Here are a couple of screenshots of what i did
The problem is that even if a drawing exists, the operation gets cancelled anyway. Can you see what is wrong with my setup?
I also tried using "IF %d_filepath%\%d_filename%.slddrw EXISTS IN VAULT NO_CASE THEN GO TO END
I didnt see this reply, sorry. I will update you soon
I can not use my PDM now so I can not create one. But as I see you are using only filename. You should use path+name+extension
I have written attached dispatch to rename drawing with part. It reads serial from parts serial from its card and rename part and drawing. It checks if there is drawing, if yes rename drawing with same name with part.
Have a look at it
I will try to look in to what might be wrong
If root cause of problem is that some parts drawing won't exist then is also option to look drawing before workflow operations.
There are some older threads what is focusing problem to finds part assemblies without drawings:
Search for prt files that do NOT have drawing file
Is there a way to create a list of all parts & sub-assemblies WITHOUT drawings inside of a main assembly?
Re: Is there a way to create a list of all parts & sub-assemblies WITHOUT drawings inside of a main assembly?
When you continue with dispatch, then start thinking about exclude some folders for example Toolbox and standard parts without drawings.
Also is better to look drawing exist before that start play like ping-pong...
We deny transition based on variable DrawingExist in part data card. Look on image with preview of dispatch script, variable and data card.
Variable must be version free so you do not have check out these files.
One of the ideas about using a dispatch to check if there is a drawing is probably the best option.
But just to give another idea if you can and want to change the process a little. In that case you could only allow them to transition the drawing files and leave the parts in the initial state.
In that case you could add a transition condition to only allow drawings to pass.
Then when the user transitioned a file it would not allow the parts to go.
Thank you very much, it works as it is supposed to :-)
Just interesting Remarque.
When I run state change from windows explorer then operation will be cancelled.
In case I run this from SolidWorks via SW Addin then looks like nothing happens. State transition will not be cancelled. Model without drawing land in "next state". SW 2016 SP5
Also can error messages be consolidated into one msg box where is listed all missing drawing files (not one by one like now)?
It works even inside SW for me. (2018 Sp05)
I couldnt find a way to append filenames and show in one msgbox.
But for an idea you can insert this message to it. "Some files do not have drawing file. Please have a look at PDM contains tab for assembly. Set configurat,ion to "do not show config". "
In contains, if you set "Do not show config", you will see drawing files there. (pls see attached image)
Retrieving data ...