Adobe Illustrator Script情報 Version 9.0.2、10
back

linePath の作成 (vbs)
[linePath.vbs の説明]

新規書類を作成して、パスを描き、パスの色を設定します。
ここでは、StrokeJoin として AiStrokeJoin の aiRoundEndJoin = 2 を使用しています。

( VB で Illustrator への参照設定している場合は、定数名を数値に変える必要はありません。)

Illustrator を起動してから、linePath.vbs を実行します。
linePath

' 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