How can i trap checkin errors in a dispatch script? Specifically if the filename already exists because no duplicate filenames is set.

I created a dispatch script to automatically check in a file when someone creates a file or drags and drops it into the PDM.  if the file already exists I want to then do an edit box to have them enter a different file name and then try the check in again so it can be checked in.

Is there a way to see the "checked out by" name in the dispatch script? At least then i could process the failed check in that way.

SolidworksSolidworks Pdm enterprise Pdm