I'm running CS6 & developing a pluging for that.
Currently I'm reading texts written in a .indd file & print them to a text file using ITextModelClass..
But I can't read texts written as TextVariable & I tried to convert them to strings using
textVariable->VariableToString(varUIDRef, temp, kTrue);
when i run the above code, it returns texts that are not relevant to the current .indd file.
when i use "kFalse" instead of kTrue it gives a runtime error & return nothing.
So how can i convert "TextVariable " to a readable text.
Hi Mr Noriko,
I have another question,
How can I run an external .exe file as a part of the pluging that I'm developing now?
Because the .exe is already written in C++ & I want to run that .exe to generate another text file, as a part of my pluging in indesign sdk.
i guess it's almost like running a service in windows.
I start working on it in next week. i'm reading about owned items & working on developments on another C++ application Then I'll tell you the progress. at the moment i want to run another .exe in the indesign code.
presently I first run the pluging & get a text file and again I run another .exe(C++) to process the data in that text file & generate another text file(processed data). Now i want to do both things by running the pluging.
I tried to get texts from text variables as how you've described.
Get ownedList from text.
Get name from owneditem.
Get ITextVariable from ITextVariableTable by name
But still I couldn't get texts,
What i've done is,
(up to "<ItextModel> textModel" it's ok)
iTextUtils->CollectOwnedItems(textModel, 0, textModel->GetPrimaryStoryThreadSpan()-1, &ownedItemList);
tempctr = ownedItemList.size();
InterfacePtr<ITextStoryThread> iTextStoryThread(UIDRef(::GetUIDRef(textModel).GetDataBase(),ownedIte mList[i].fUID),UseDefaultIID());
But this way i couldn't get any result.
please tell me what may be the reason?..