0 Replies Latest reply on Dec 10, 2015 6:51 AM by Nidhi Bansal

    How to capture layer coordinates in .Net code ?

    Nidhi Bansal

      I have an .ai image with 3 layers in it. Screenshot attached below. I need to capture coordinates (X,Y,width,height) of all elements or objects falling inside Header,Body, footer layers:



      For e.g. the "Body layer" from above screenshot should return following information:

      ContentCoordinates of each object  Scaling factor
      4 Gwidth-height-top-left of "4 G"30%
      5 Jwidth-height-top-left of "5 J"10%
      6 Mwidth-height-top-left of "6 M"35%
      Bodywidth-height-top-left of "Body"40%


      Question 1:

      I would be provided start and end pixel position of each section/layer configured in my system from before. For e.g. header would start from 0,0 px and end at 1240, 188 px.

      I then plan to find this layer position in my code and fetch all the elements/objects falling inside this layer. My problem is I am not getting Top , Left properties inside Adobe "layer" class which provides me with this information. See screenshot below:




      Question 2:

      How do I retrieve the scaling factor of each object in code? I could get opacity, Resolution properties, but nothing on Scaling !!! Please help


      Note: I am using "Adobe Illustrator 18 Type Library"  in my .Net 4.0 code.