posted on February 17, 2020

There appears to be an issue in the scripting activity where Type names are not resolved in the correct order. Consider the following scenario where a script contains the following using statements.
 

using System.Drawing; 
using Microsoft.Office.Interop.Word

If the script uses a class in System.Drawing such as in the following line:

var destRect = new System.Drawing.Rectangle(0, 0, width, height);

 

The workflow script editor will find the System type in Microsoft.Office.Interop.Word and attempt to resolve Drawing as Microsoft.Office.Interop.Word.System.Drawing instead of System.Drawing. 

The effect of this is that your script (while correct) will not compile in the editor. It will compile in another editor such as Visual Studio however.

 

enlightened   All is not lost...

 

To get around this, you can use a using alias directive to ensure the types resolve correctly. (until Laserfiche resolves the issue wink   )

Eg: replace 

using System.Drawing; 

with 

using dw=System.Drawing;

and

var destRect = new System.Drawing.Rectangle(0, 0, width, height);

with

var destRect = new dw.Rectangle(0, 0, width, height); 

Your script will now compile.

 

0 0