Skip to main content
Inspiring
September 11, 2022
Answered

I want to pass an ITextFrameColumn to IScriptRequestData::AppendReturnData

  • September 11, 2022
  • 1 reply
  • 186 views

I want to pass an ITextFrameColumn to IScriptRequestData::AppendReturnData

This topic has been closed for replies.
Correct answer 琥珀 猫太郎

In order to pass a text frame from the SDK to ExtendScript, it was necessary to pass IGraphicFrameData.

I noticed after reading the description of SDKLayoutHelper::CreateTextFrame.

 

example

InterfacePtr<IMultiColumnTextFrame> multiColumnFrame(textFrameColumn->QueryMultiColumnTextFrame());

InterfacePtr<IHierarchy> hierarchy(Utils<ITextUtils>()->QuerySplineFromTextFrame(multiColumnFrame));

InterfacePtr<IGraphicFrameData> graphicFrameData(hierarchy, UseDefaultIID());

InterfacePtr<IScript> script_Return(graphicFrameData, UseDefaultIID());

ScriptData scriptData(script_Return);

scriptRequestData->AppendReturnData(script, scriptID, scriptData);

 

1 reply

Inspiring
September 11, 2022
Is it correct to want to return an IMultiColumnTextFrame?
I want to pass a text frame to ExtendScript.
琥珀 猫太郎AuthorCorrect answer
Inspiring
September 12, 2022

In order to pass a text frame from the SDK to ExtendScript, it was necessary to pass IGraphicFrameData.

I noticed after reading the description of SDKLayoutHelper::CreateTextFrame.

 

example

InterfacePtr<IMultiColumnTextFrame> multiColumnFrame(textFrameColumn->QueryMultiColumnTextFrame());

InterfacePtr<IHierarchy> hierarchy(Utils<ITextUtils>()->QuerySplineFromTextFrame(multiColumnFrame));

InterfacePtr<IGraphicFrameData> graphicFrameData(hierarchy, UseDefaultIID());

InterfacePtr<IScript> script_Return(graphicFrameData, UseDefaultIID());

ScriptData scriptData(script_Return);

scriptRequestData->AppendReturnData(script, scriptID, scriptData);