Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 152999

How to draw a line on Illustrator using Excel Coordinates via VBA

$
0
0

Sub line_viaCoordinates()

 

  Set appRef = CreateObject("Illustrator.Application")

 

    Dim iapp As New Illustrator.Application

    Dim idoc As Illustrator.Document

    Dim isquare As Illustrator.PathItem

 

    Set idoc = iapp.Documents.Add

   

    Dim lineList(4)

 

    lineList(0) = Array(50, 50)

    lineList(1) = Array(50, 100)

    lineList(2) = Array(100, 100)

    lineList(3) = Array(150, 80)

    lineList(4) = Array(90, 200)

   

    'my question is: How to turn this Array(50, 50) into Array(RANGE B1, RANGEC1)... So whatever number I type into this cell on Excel, Illustator will use it as input to draw the line.

  

        Set isquare = idoc.PathItems.Add

        isquare.SetEntirePath (lineList)

   

    Set isquare = Nothing

    Set idoc = Nothing

    Set iapp = Nothing

   

End Sub


Viewing all articles
Browse latest Browse all 152999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>