' linePath.vbs
Dim aiApp 'Illustrator.Application
Dim linePath 'Illustrator.PathItem
Dim lnColor 'Illustrator.Color
Dim lnRGBColor 'Illustrator.RGBColor
Set aiApp = GetObject("","Illustrator.Application")
aiApp.Documents.Add
Set lnRGBColor = GetObject("","Illustrator.RGBColor")
Set lnColor = GetObject("","Illustrator.Color")
lnRGBColor.Red = 255
lnRGBColor.Green = 0
lnRGBColor.Blue = 0
lnColor.RGB = lnRGBColor
Set linePath = aiApp.ActiveDocument.PathItems.Add
linePath.SetEntirePath Array(Array(100, 100), _
Array(100, 300), _
Array(300, 300), _
Array(300, 100))
linePath.Closed = False
linePath.Stroked = True
linePath.StrokeWidth = 2
linePath.StrokeColor = lnColor
linePath.Filled = False
linePath.StrokeJoin = 2 'aiRoundEndJoin
|