14 Replies Latest reply on May 12, 2017 2:44 PM by kai*smith

    Is it possible to find the X & Y coordinates for a single cell in a table?

    kai*smith Level 1

      I've spent hours googling this, and I'm beginning to think this isn't possible? Any help much appreciated, as always!

        • 1. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
          amaarora Adobe Employee

          Hi,

          Did you try using the info panel from Windows menu?

          You can hover your mouse at the desired location to get the X and Y coordinates

           

          -Aman

          2 people found this helpful
          • 2. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
            Barbara Ash Adobe Community Professional

            As amaarora suggested, Info panel will give you that information.

            You might also like the Measure tool.

            Dragging the measure tool over the cell will give you information about the height/width in addition to cursor location.

            2 people found this helpful
            • 3. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
              Obi-wan Kenobi Adobe Community Professional

              Hi,

               

              Not really sure that the most important is "How?" … but "Why?" do you want to know that and "What?" do you want to do with this information?

               

              (^/) 

              1 person found this helpful
              • 4. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                rob day Adobe Community Professional & MVP

                You should be able to get it via scripting. If you are using OSX place your cursor in the cell you want to get and try this AppleScript.

                 

                Screen Shot 2017-04-30 at 3.09.04 PM.png

                 

                --------------------------------------------------

                tell application "Adobe InDesign CC 2014"

                    set b to baseline of last line of parent of selection

                    set bi to bottom inset of parent of selection

                    set h to height of parent of selection

                    set y to (b + bi) - h

                  

                    set ho to horizontal offset of last line of parent of selection

                    set li to left inset of parent of selection

                    set x to ho - li

                  

                    display dialog "Cell x,y = " & x & ", " & y

                end tell

                • 5. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                  Laubender Adobe Community Professional & MVP

                  kai*smith  wrote

                   

                  I've spent hours googling this, and I'm beginning to think this isn't possible? Any help much appreciated, as always!

                  Hi Kailar,

                  you cannot read out position and dimensions of a table cell directly. For dimensions you can get the width of a selected cell. But not the height of a cell, if a minimum height is set and not a abolute value.


                  I would do a feature request on this here:

                  Feature Request/Bug Report Form

                   

                  If you are using the method Aman is suggesting in reply 1 or the one Barbara is doing in reply 2 it will be a bit unprecise depending on the zoom factor you are currently using. You could also do a rectangle on top of the cell when zoomed in and read the numbers from the selected rectangle.

                   

                  As Rob is showing in reply 4 one could calculate the position and dimensions by scripting.
                  However Rob's method is doing this on grounds of some basic assumptions:

                   

                  1. The cell is a text cell and no graphic cell ( graphic cells were introduced with InDesign CC 2015 ).

                  2. The cell is not rotated.

                  3. The cell is not overset.

                  4. The text frame holding the table is not rotated.

                  5. The text frame holding the table is not sheared.

                  6. The text is not set in right-to-left direction ( where the cell's direction is right-to-left )

                   

                  Hm… After a bit testing with Rob's script:
                  And I think, Rob's script snippet has a little bug where the y-position is not calculated accurately.

                  At least in the sample below where I set the zero point to the left upper edge of a normal text cell:

                   

                  Test-RobDay-Snippet-XY-Position-TextCell.png

                  The dialog should read: Cell x,y = 0,0, 0,0.
                  Do not wonder about the commas. I am working with a German InDesign on a German OSX where 0.0 is alerted as 0,0 .

                  Tested with InDesign CC 2017.1 12.1.0.56 on Mac OSX 10.10.5.

                   

                  What is your exact InDesign version on what OS ?
                  Maybe you'll need an ExtendScript script if you are on Windows.

                   

                  And what exact position do you need?

                  The x/y position with or without the stroke weight of top and left cell stroke?

                   

                  Do you want to draw a rectangle in exact position and size of the cell perhaps?
                  Stacked behind the table?

                   

                  My suggestion without using a script:

                  If you are on InDesign CC 2015 or CC 2017 this could be achieved better by converting a text cell to a graphic cell, copy the rectangle of the graphic cell to the clipboard, undo the conversion and paste the clipboard's contents with Paste in Place.

                   

                  Here are the steps that would also work with overset cells, rotated or sheared tables or rotated cells.

                  ( CC 2015 or CC 2017 only ! )

                   

                  1. Select the cell.

                  2. Set the cell to a fixed height.

                  3. Remove its contents.

                  4. Convert cell to graphic cell.

                  5. Select empty frame in cell.

                  6. Cut it to the clipboard.

                   

                  Undo all steps 2-6.

                   

                  7. Do Paste In Place.

                  Read out the numbers from the selected object.

                  Important note:

                  The rectangle will describe the area of the cell minus half the stroke weights around the cell.

                  Why? Containers of graphic cells are always restricted by the strokes of a cell.

                   

                  FWIW: Steps 2-7 could be scripted as well.
                  And stroke weights of the cell could be factored in this way.

                   

                  Regards,
                  Uwe

                  1 person found this helpful
                  • 6. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                    Laubender Adobe Community Professional & MVP

                    Something added:

                    If the text frame holding the table is rotated other than 90°, 180° or 270° or is sheared, you have to include another tiny step:

                     

                    5.1 Convert the container frame's shape to a rectangle.

                     

                    Why? Rotated or sheared text cells when onverted to graphic cells will contain a polygon and not a rectangle after conversion.

                     

                    Regards,
                    Uwe

                    2 people found this helpful
                    • 7. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                      kai*smith Level 1

                      To be perfectly honest, I can't remember why I need the information. I was having trouble accessing the Forum until today, so I was unable to reply. I did, however, receive the responses via email and was able to get the information I needed to do what I was trying to do (whatever that might have been). Thank you for your comment.

                      • 8. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                        kai*smith Level 1

                        Hello! I am very sorry to all of you! I really appreciate all your help! I wasn't able to access the forum until today, but I received your replies via email and was able to get the information I needed and do what I needed to do! I apologize for not being able to reply! I didn't want you all to think I was being rude. Launender, can you please tell me how I'd go about doing a feature request? I know I'd need to follow the link you provided, but I'm not sure how I would explain what I'm asking for? Would it be sufficient to just basically say what I said in my original post? Thanks again! And sorry for the long delay in response, I wasn't ignoring you guys! I really appreciate your help!

                        • 9. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                          kai*smith Level 1

                          Hello! I am using Windows 10 (unfortunately).. Can you explain how I would do this script using this platform? If not it's totally okay, I am trying to learn a little about scripting, and if you could explain easily how I'd do this, it would be helpful in the future! Thank you for your input!

                          • 10. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                            rob day Adobe Community Professional & MVP

                            As Uwe pointed out my script wouldn't always be accurate for the Y value. In scripting cells don't have a bounds property, so it is difficult to get.

                            1 person found this helpful
                            • 11. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                              kai*smith Level 1

                              Hello Barbara! Thank you very much for your reply! I do apologize for the long delay in my response. As you can see from my responses above, I wasn't able to access the forum for quite a while. I finally found a strange way to fix it, and I still have no idea why it worked! But I'm back. Thanks again for your advice and contribution. I really appreciate everyone who has helped me! I don't know what I'd do without you all! I'm currently looking for some online courses that are affordable so I can really learn the software. I am spending time each day watching tutorials, but I'd love to take an actual course. Unfortunately all the courses I've found so far are nowhere near my price range/budget. If you, or anyone who sees this knows if any courses that are (hopefully free) or low cost, please share! From what I've seen I don't think that there are any that are thorough that would be something I can afford at this time, but I am continually looking and, hopefully I can take some good courses in the future. I am trying to learn as I go, as I am making different booklets that I will be using to open a small business, and I am hoping I will be successful enough with that to be able to fund some further education for myself. I'd love to learn InDesign, Photoshop, and Illustrator and be comfortable with all three of those, as I know if I can become efficient with these, I will be able to do many things from home and have a decent income. I am also homeschooling my son, and would love to be able to teach him these applications, I believe that anyone who knows them well can be successful. Sorry if I've rambled a bit here. I appreciate your help! Have a wonderful weekend!!

                              • 12. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                                Barbara Ash Adobe Community Professional

                                As far as taking courses, it would help to know where you are located.

                                • 13. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                                  kai*smith Level 1

                                  Okay, I'm sorry, I missed that part. I was trying to read everything quickly because although I got emails on most of the replies, I didn't get one for all of them, so I was trying to read it all pretty fast and didn't see that part. Thank you!

                                  • 14. Re: Is it possible to find the X & Y coordinates for a single cell in a table?
                                    kai*smith Level 1

                                    I'm sorry, I am in the Huntsville Alabama area as of now. I am hoping to find online courses. I have a lot of health problems and unable to get out a lot. I'm sure I could find classes at one of the community colleges or even UAH, but it would be nearly impossible for me to follow a schedule, and I can't drive much due to my health. I have been looking and have found a few things that seem useful, I would just like to learn as much as I can and have something that's kind of structured so I will be able to tell if I'm truly learning, something with quizzes etc. Thank you!