Skip to main content
Participating Frequently
May 26, 2008
Question

reading data from text frame

  • May 26, 2008
  • 7 replies
  • 593 views
hi 2 all
I am new in this adobe indesign cs3 i want to know step for how to read data from text frame. hope so some one help m i know its small problem but for m bigggggggg

i want to devlop plugin which will read data from text frame and forming its string and pass to CA() method.

Yogesh
This topic has been closed for replies.

7 replies

Participant
July 1, 2008
Hi,
Do you want the UIDRef of TextFrame(s) ?

--Meraj Ahmad Ansari
Participating Frequently
June 12, 2008
Hello Mr. MS Choudry and Mr.dude0000

Thanks to both of u created my own plugin which can read each and every text frame present in Document eventhough its selected or not
I use dude0000 and with out using TextMiscellanySuit

Thanks to all of u
Be in touch
Participating Frequently
June 11, 2008
Hello dude0000

Thanks Tht code is working fine
Participating Frequently
June 11, 2008
Hello Mr. MS Choudry <br /><br />Thanks for ur participation i my query.<br /><br />I work on Mr.dude0000 code its working fine.<br /><br />I am learning abt indesign since 2 month so i might ask some silly question so soory for that in advance.<br /><br />Q. As my TL told me tht whenever u want to collect any information from document u need to write ur own TextMiscellanySuit and i completed my assigment by tht way but when i come across dude0000 code i feel to do my assigment this way too.<br />for in dude0000 code i require UIDRef tht i got from TxtMiscellanySuit<br />code for tht is<br /><br />bool16 TextMiscellanySuiteLayoutCSB::GetUidList(UIDList & TempUidList)<br />{<br />CA("TextMiscellanySuiteLayoutCSB::GetUidList");<br /> InterfacePtr<ILayoutTarget>iLayoutTarget(this, UseDefaultIID());<br /> if(!iLayoutTarget)<br /> { <br /> CA("!TextMiscellanySuiteLayoutCSB::GetUidList::iLayoutTarget");<br /> return kFalse;<br /> }<br /> const UIDList selectedItems(iLayoutTarget->GetUIDList(kStripStandoffs));<br /> TempUidList = selectedItems; <br /> return 1;<br />}<br /><br />here "this" act as TextMiscellanySuiteLayoutCSB * const this<br />so without TextMiscellanySuiteLayoutCSB how i can get UIDRef<br /><br />so whatever u say suit not required i am not getting?<br /><br />1)1st i comleted tht assigment in which i copy code from snippet runner report character and using suit<br />2)2ndly i completed tht assigment using dude0000 code and using suit<br /><br />is Their any other Way to get UIDRef?<br /><br />Thanks and Regards
Known Participant
June 11, 2008
Hello yogeshpatil
This totally depends on the requirement, if u just want to read the data from Text frame then dude0000 is perfectly right, You should use the above code no need to write your own suit for that.
Regards
MS Choudry
Participating Frequently
June 10, 2008
hi dude0000
Thanks for d help
did u think i required to write my own TextMiscellanySuit and provide ASB & CSB before using this code my team leader told m tht u 1st need to write ur own TextMiscellanySuit for ur assigment.
waiting for ur reply
Known Participant
May 30, 2008
Hi yogeshpatil,<br />you can try this<br />InterfacePtr<IGraphicFrameData> GFrm(textFrameItemRef, UseDefaultIID());<br />InterfacePtr<IMultiColumnTextFrame> MCTF(GFrm->QueryMCTextFrame());<br />InterfacePtr<ITextModel> TxtModel(MCTF->QueryTextModel());<br />InterfacePtr<IComposeScanner>iComposeScanner(TxtModel,UseDefaultIID());<br />WideString retval("");<br />int32 length=TxtModel->TotalLength();<br />iComposeScanner->CopyText(0,length,&retval);<br /><br />retval will contain value read from textframe.