Highlighted

Character Count values in C++

Explorer ,
May 11, 2020

Copy link to clipboard

Copied

Hi,

 

I have an code to count the character which is present inside the table. And my doubt is can I use the same code to get the count character to all the content present in the whole document.Also for adding the values in panel whether I want to include any header files or interface/class into my code Please guide me.

 

InterfacePtr<ITextStoryThreadDict> textStoryThreadDict(tableModel, UseDefaultIID());

if (textStoryThreadDict) {

Text::StoryRange storyRange = textStoryThreadDict->GetThreadBlockTextRange();

}

Nithu
Adobe Community Professional
Correct answer by Laubender | Adobe Community Professional

Hi Nithu,

 

I would work with a GREP Find action and count the character length of the result.

That would reach any story, any table cell ( also from nested tables ), any footnote text if you allow to search for it in the GREP options. Also in not active states of buttons and MSOs.

 

And if you un-hide hidden text you could count hidden text as well.

 

Well, for the contents of Note objects you need a second custom function.

Maybe also for form fields.

 

Regards,
Uwe Laubender

( ACP )

TOPICS
SDK

Views

320

Likes

Translate

Translate

Report

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

Character Count values in C++

Explorer ,
May 11, 2020

Copy link to clipboard

Copied

Hi,

 

I have an code to count the character which is present inside the table. And my doubt is can I use the same code to get the count character to all the content present in the whole document.Also for adding the values in panel whether I want to include any header files or interface/class into my code Please guide me.

 

InterfacePtr<ITextStoryThreadDict> textStoryThreadDict(tableModel, UseDefaultIID());

if (textStoryThreadDict) {

Text::StoryRange storyRange = textStoryThreadDict->GetThreadBlockTextRange();

}

Nithu
Adobe Community Professional
Correct answer by Laubender | Adobe Community Professional

Hi Nithu,

 

I would work with a GREP Find action and count the character length of the result.

That would reach any story, any table cell ( also from nested tables ), any footnote text if you allow to search for it in the GREP options. Also in not active states of buttons and MSOs.

 

And if you un-hide hidden text you could count hidden text as well.

 

Well, for the contents of Note objects you need a second custom function.

Maybe also for form fields.

 

Regards,
Uwe Laubender

( ACP )

TOPICS
SDK

Views

321

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 11, 2020 0
Adobe Community Professional ,
May 11, 2020

Copy link to clipboard

Copied

Hi Nithu,

 

I would work with a GREP Find action and count the character length of the result.

That would reach any story, any table cell ( also from nested tables ), any footnote text if you allow to search for it in the GREP options. Also in not active states of buttons and MSOs.

 

And if you un-hide hidden text you could count hidden text as well.

 

Well, for the contents of Note objects you need a second custom function.

Maybe also for form fields.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 11, 2020 1
Nithu_S LATEST
Explorer ,
May 11, 2020

Copy link to clipboard

Copied

Hi,

thanks for your reply i'll check.

Nithu

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 11, 2020 0