Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Boss for "Smart Text Reflow"

Enthusiast ,
May 08, 2020 May 08, 2020

Which boss is used for "Smart Text Reflow" (found under indesign's Preference/Type)?

TOPICS
SDK
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 09, 2020 May 09, 2020

The command boss is kSetAutoFlowOptionsCmdBoss. However looking at it the documentation does not mention any interface(the implementation is hiddent) that can be used to set the different options. So an alternative is to use the Facade::ITextPreferencesFacade class it has a method SetDynamicAutoFlowOptions which should serve the purpose.

 

-Manan

Translate
Community Expert ,
May 09, 2020 May 09, 2020

What do you mean by boss?
Do you asking about the benifits of Smat Text Reflow?! 
If so, Smart Text Reflow is an InDesign type preference that will automatically add pages when you flow text into your layout or remove pages as text is deleted during editing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 09, 2020 May 09, 2020

Thanks for your reply.

I need to toggle the checkbox selection.

I found 'kSetSmartTextPrefsCmdBoss' but it is not working.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2020 May 09, 2020

The command boss is kSetAutoFlowOptionsCmdBoss. However looking at it the documentation does not mention any interface(the implementation is hiddent) that can be used to set the different options. So an alternative is to use the Facade::ITextPreferencesFacade class it has a method SetDynamicAutoFlowOptions which should serve the purpose.

 

-Manan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 09, 2020 May 09, 2020

Thank you Manan. Working fine.

 

InterfacePtr<IWorkspace> ws(GetExecutionContextSession()->QueryWorkspace());
if(ws==nil) break;
IDataBase* db = ::GetDataBase(ws);
Utils<Facade::ITextPreferencesFacade> tpfacade;
tpfacade->SetDynamicAutoFlowOptions(kFalse, Facade::kAtEndOfStory, kFalse, kFalse, kFalse, db);

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2020 May 09, 2020

I suppose you are setting the option at the application level, in that case i think you can pass a nil for the db. For document level db is needed, for application level nill would work. Confirm once from the method decleration.

 

-Manan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 09, 2020 May 09, 2020
LATEST

Hi Manan,

 

Thanks for your suggestion.

I put this code in the startupservice and it is working fine.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines