Syntax.CreateInvoke no longer creates "Run Script Routine" for Keyword Test
I have a number of Script Extensions that I wrote over 7 years ago. Sometime in the last year or so the record actions no longer work properly, in that the syntax that is created no longer uses "Run Script Routine" and instead tries to invoke my function directly.
Here is a sample of my code:
// Generate the set code function CreateSetSyntax(ldName, name, value) { // Generate the treeHelp set call by calling the layoutDesignerSetValue script var call; call = Syntax.CreateInvoke(); call.ClassValue = "LayoutDesignerFunctions"; call.InvokeName = "layoutDesignerSetValue"; call.IsProperty = false; call.AddParameter(ldName); call.AddParameter(name); call.AddParameter(value); return call; } ... // Generate code for the set method var syntax = CreateSetSyntax(ldName, name, value); ... // Insert the generated code into the recorded script Recorder.AddSyntaxToScript(syntax); // Or: Recorder.AddTextToScript(Syntax.GenerateSource(syntax));
Both Recorder.AddSyntaxToScript() and Recorder.AddTextToScript() seem to do the same thing so I've used the first form all these years.
Until recently the above inserted the following into my Keyword Test at record time:
Run Script Routine LayoutDesignerFunctions - layoutDesignerSetValue "Aliases.StripLog.LayoutForm", "Track=Curve Track 1|Layer=Eng. Data|Property=Constrain to Grid", "False"
but now it creates:
LayoutDesignerFunctions layoutDesignerSetValue "Aliases.StripLog.LayoutForm", "Track=Curve Track 1|Layer=Eng. Data|Property=Constrain to Grid", "False"
I don't mind changing my code if necessary, but I can't find how to fix this. Or did it get broken when they resurrected record-time script extensions awhile ago?