Copy link to clipboard
Copied
I am having issues with "text variables".
In the SDK ITextVariableFacade->ChangeVariable() uses class 'ChangeVariableInfo' as 1 of the parameters. This class in not in the SDK. This class is also needed for ITextVariableChangeData (which is used in kChangeTextVariableCmdBoss and kChangeTextVariableInstanceCmdBoss) making it impossible to change the definition of Text Variable with SDK.
Also missing is class 'VariableTypeInfo' used as parameter in ITextVariableFacade->GetVariableTypeInfo().
Anyone with experience dealing with text variables or missing SDK definitions advice will be greatly appreciated
Copy link to clipboard
Copied
A similar case was type on path, at least a few major versions ago. The public API offers one command while internally TOP used a different one with missing interfaces. Guess which one did not work. I worked around via scripting, you could also talk to the responsible script provider 😉
Dirk
Copy link to clipboard
Copied
Thanks Dirk;
I don't know of any examples using script providers. Would it be possible for you to describe the process of communicating with script provider.
Copy link to clipboard
Copied
From memory, it's been a while and not in my source:
Grab an IScriptManager from service registry.
Set up a RequestContext for it.
Use Utils<IScriptUtils>()->QueryScriptRequestHandler() to obtain the IScriptRequestHandler.
Let the IScriptManager construct a script event, fill it in the same way as you would receive it in an own script provider.
The IScriptRequestHandler dispatches the event to the responsible script provider.
Dirk
Copy link to clipboard
Copied
An alternative is to use the IScriptRunner to run a small javascript to change the content of the variable.
Thomas
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more