Article View: adobe.scripting.indesign
Article #18162Re: method 'StrokeDashAndGap' failing (VB)
From: Olav Kvern
Date: Thu, 17 Apr 2003 05:57
Date: Thu, 17 Apr 2003 05:57
37 lines
2292 bytes
2292 bytes
bluelight--
The only time that the StrokeDashAndGap property is valid is when the stroke type is idDashed. The value of StrokeDashAndGap is a variant array of up to six values--just like the fields at the bottom of the Stroke palette when you're using a custom dashed stroke.
Consider the following:
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application.2.0")
If myInDesign.Documents.Count <> 0 Then
Set mySelection = myInDesign.Selection
If mySelection.Count > 0 Then
Select Case TypeName(mySelection.Item(1))
Case "Text", "InsertionPoint"
Rem Text selection; do nothing
Case Else
Set myPageItem = mySelection.Item(1)
If myPageItem.StrokeType = idDashed Then
myDashArray = myPageItem.StrokeDashAndGap
Else
MsgBox "Page items with solid strokes do not have a dash and gap array."
End If
End Select
End If
End If
It looks like you're trying to copy a property from one object (a rectangle) to an object you've defined (myObj). Whether this will ever work will depend on the way you've defined myObj. (I'm guessing this because myObj is not an InDesign object, as no object has a strokeDash property.)
Want to let me in on what you're trying to do? There may be some other things I can help with.<g>
Thanks,
Ole
Technical Details
Message-ID:
<1de8c354.0@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<1de8c354.-1@WebX.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,e188885c1a2acafd X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-04-16 23:08:10 PST From: "Olav Kvern" <okvern@adobe.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!216.166.71.118.MISMATCH!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: method 'StrokeDashAndGap' failing (VB) Message-ID: <1de8c354.0@WebX.la2eafNXanI> Date: Wed, 16 Apr 2003 22:57:51 -0700 References: <1de8c354.-1@WebX.la2eafNXanI> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit