I keep getting a compile error of unresolved text symbol ITextRanges.聽 At the top of my file I have using
namespace ATE;
Why can the compiler not find this symbol.聽 I am a begginer at this API.聽 I did the example of got it to work.聽 This is my firsat attempt of writing one from scratch.聽 I have it running and added to the menu.聽 Al聽 I am trying to do now is just count the number of Text items selected on the screen but keep getting a build error when referencing ITextRanges.聽 Surely this cannot be that hard to do.
unresolved external symbol ITextRangesIf you haven't included any ATE headers it will complain because without those you won't have an ATE namespace defined. If you've got
#include ''IText.h'' at the top of your file and this is still happening, try right-clicking on it and and select 'Open 'IText.h''. It should jump to the file -- make sure its the one you want! I know of at least one other time that some 3rd party library I was using had another IText.h and it cause me some grief (you can solve that incidentally by simpling doing #include ''ate/IText.h'').
That all said, if you just want to count the number of text objects selected, you don't need the ATE at all. You should be able to to just get the selected art set (AIArtSet.h) and then iterate over it asking each piece of art what type it is (AIArt.h; AIArtSuite::GetArtType()) -- if its kTextFrameArt then you increment your count.
unresolved external symbol ITextRangesThanks . . will give it a shot.
Actually I am trying to do more than count. I am developing a tool to draw a box around each piece of selected text. The box needs to just slightly larger than the range so it does not touch the text. I just thought simply getting to the point to count selected text items would be a good start plus it will help me get familiar with this API
You still may not need the ATE depending on what kind of box you need to draw. AIArt.h has the means to get the bounding box of a piece of art regardless of type; that might be enough for your box.
All I need is just a simple bounding box. Will try this route. Thanks.
Still new to all this so I am trying to learn as much as I can. My
company just purchased 30+ seats of AI and we are transitioning to AI
for our Map Finishing production. They need customized tools which is
why I have dove into this head first. Not really a pro at C++ and the
NameSpace convention but I am learning. I know ''C'' like the back of my
hand.
No comments:
Post a Comment