I was able to successfully install the Dymo SDK and call a print job from the workflow designer using the script activity and C# (Using the play button in the script editor). However when the workflow runs, the Dymo prints a full black label instead of the label it was instructed to print. The code did not change, so some external hidden influence must be involved.
So I installed Visual Studio, wrote a C# console application, entered the same SDK code. Then I wrote code in the workflow script activity to execute the console application. I click play in the script editor, it prints the label. I run the workflow, and nothing happens. The output string from my command execution is also just blank. Some external influence seems to be preventing me from using this SDK.
I read all the posts regarding not being able to print unattended, but I think this applies to calling a print job through windows, not through the manufactures SDK. I am able to print. The image is just full inked black instead of what it was instructed to print. I am lost as to why the same method, given the same input, is producing two different outputs (All Black Ink vs First Name, Last name, Company Name). This is unusual for a computer program unless there are inputs being made by a system out of my reach.
Here is the code I am using to run my Visual Studio made application as a work around. Again, this code also works perfectly when run in the designer, but from the workflow produces a different output (Nothing).
System.Diagnostics.Process pProcess = new System.Diagnostics.Process(); pProcess.StartInfo.FileName = @"C:\Dymo\CustomPrintProgram.exe"; pProcess.StartInfo.Arguments = first + " " + last + " " + company; //argument pProcess.StartInfo.UseShellExecute = false; pProcess.StartInfo.RedirectStandardOutput = true; pProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; pProcess.StartInfo.CreateNoWindow = true; //not diplay a windows pProcess.Start(); string output = pProcess.StandardOutput.ReadToEnd(); //The output result pProcess.WaitForExit(); SetToken("Out",output);