[CS3] Stroke Type of an page item?

Hello!
Does anybody know how to get the stroke type of an page item?
There are so many possibilities.
Thanks,
Alois Blaimer

Hello!<br /><br />I have found somenthing:<br /><br />          // Inspect dash.<br />          InterfacePtr<IDashedAttributeValues> dashedAttributeValues(static_cast<IDashedAttributeValues*>(descriptor->QueryAttribute(kDa shedAttributeValuesBoss, IDashedAttributeValues::kDefaultIID)));<br />          if (dashedAttributeValues != nil) {<br />               SNIPLOG(" dashedAttributeValues");<br />               for (int32 i = 0; i < dashedAttributeValues->NumValues(); i++) {<br />                    SNIPLOG("  [%d] %f", i, ::ToDouble(dashedAttributeValues->GetValue(i)));<br />               }<br />          }<br /><br />But the problem is, it always returns "12". I change the stroke style and it always returns "12".<br /><br />What's wrong with the code?<br /><br />Thanks,<br />Alois Blaimer

Similar Messages

  • Get the type of a Page Item

    Hey guys,
    i am working on an inDesign extension. i have a requirement to go through the document elements. i was able to get all pageItem objects on a doc page.
    i am now trying to figure out what is the type of each pageItem so i am using the following code that i found in here:
    http://cssdk.host.adobe.com/sdk/2.1/docs/WebHelp/app_notes/indesign_pa ge_items.htm
    //Given a page item "myPageItem" of unknown type:
    var myPageItemType:String = flash.utils.getQualifiedClassName(myPageItem);
    this is supposed to give me for example: com.adobe.indesign::Rectangle
    instead all items are returning: com.adobe.indesign::PageItem
    any idea what i am doing wrong here?
    Thank for the your help.

    Responded on the EB forum...

  • [AS] Change Colour of  all page items on layer

    Hi
    I am trying to set up a script to change the colour of fill, stroke and text of page items on one layer, and having very little luck, what I have so far is below, as it stands I seem to only be creating the swatch, could I get a few pointers on how to do this correctly please?
    I have three attempts as below, which return pretty much the same result, nothing?
    (1)
    tell application "Adobe InDesign CS3"
    set myDocument to active document
    activate
    tell document 1
    try
    set _Swatch to make color with properties {name:"PANTONE Blue 072 U", color:spot, color value:{100, 88, 0, 5}, model:spot}
    set _NewColour to swatch "PANTONE Blue 072 U"
    set swatch _NewColour to every page item whose fill color is swatch "Black"
    set swatch _NewColour to every page item whose stroke color is swatch "Black"
    end try
    end tell
    end tell
    (2)
    tell application "Adobe InDesign CS3"
    set myDocument to active document
    activate
    tell document 1
    try
    set _Swatch to make color with properties {name:"PANTONE Blue 072 U", color:spot, color value:{100, 88, 0, 5}, model:spot}
    set _NewColour to swatch "PANTONE Blue 072 U"
    set _Colour to swatch "Black"
    set _Fill to every page item whose fill color is swatch "Black"
    set _Fill to _NewColour
    set _Stroked to every page item whose stroke color is swatch "Black"
    set _Stroked to _NewColour
    end try
    end tell
    end tell
    (3)
    tell application "Adobe InDesign CS3"
    set myDocument to active document
    activate
    tell document 1
    try
    set _Swatch to make color with properties {name:"PANTONE Blue 072 U", color:spot, color value:{100, 88, 0, 5}, model:spot}
    set _NewColour to swatch "PANTONE Blue 072 U"
    set _Colour to swatch "Black"
    set _Fill to every page item whose fill color is swatch "Black"
    set _Stroked to every page item whose stroke color is swatch "Black"
    set _All to _Fill & _Stroked
    set swatch of _All to swatch _NewColour
    end try
    end tell
    end tell
    Cheers
    Kev

    Try this:<br /><br />tell application "Adobe InDesign CS3"<br />    set myDocument to active document<br />    activate<br />    tell document 1<br />        try<br />            set theLayer to layer 1 -- or whatever<br />            set _Swatch to make color with properties {name:"PANTONE Blue<br />072 U", color:spot, color value:{100, 88, 0, 5}, model:spot}<br />            set _Colour to swatch "Black"<br />            set fill color of every item of all page items whose fill color<br />is _Colour and item layer is theLayer to _Swatch<br />            set stroke color of every item of all page items whose stroke<br />color is _Colour and item layer is theLayer to _Swatch<br />        end try<br />    end tell<br />end tell<br /><br />-- <br />Shane Stanley <[email protected]>

  • Session state of page item different from one region to another region

    hi,
    on one particular page I have two regions. A page item (LOV pop-up) is set in the first region. I leave this region with a button and jump back with a branch to the same page. The page item has now the selected value (as is shown by session state window). So far so good.
    The second region (SQL query type) uses this page item. However, for some reason the page item is NULL in that second region.
    Can anyone explain this behavior ?
    ron

    thanks Joel,
    I did already what you suggested. The title in region 2 is evaluated to the same value as in region 1.
    The SQL query (that actually runned with identical syntax before) is:
    select bla from blatable where bla = :P920_RU
    this generates:
    report error:
    ORA-12801: error signaled in parallel query server P000
    ORA-01741: illegal zero-length identifier
    So apperently the bind variable is evaluted to (or cached as) NULL.
    I noticed something strange in the session window. There are several page items in the application. All of them are listed in the 'Session State' region. The page item that makes problems is the only one that is also listed in the 'Page Items' region. It is even listed when I start the session window from another page. Weird.
    any other ideas ?
    Actually, how could you possibly clear session state between rendering two regions ?
    Ron

  • Using SQL Query for page item source does not insert populated value

    Hi All,
    Following are the attribute details of a certain page item on an edit form:
    Display As: Text Field
    Page Item Source Type: SQL Query
    Source value Expression: SELECT a from tab where id = 'ABC'
    Although the field appears populated on the screen, but the value is not inserted in the table.
    Can anyone help on this?
    Thanks in advance,
    Annie

    Annie:
    One solution is to define a pl/sql function that given a date will return the 'run-date'. Something like create or replace function get_prod_date(p_date in date) return date is
    retval date;
    begin
    select run_date into retval from tab_x where run_date=p_date;
    return retval;
    end;Change the Source Type for the page-item back to 'Database Column'
    Set Source value or expression to the 'database column name'
    Set 'Post calculation computation' to be
    get_prod_date(:pxx_date)
    Varad

  • What is the evaluation order of Page Items

    I just wonder what the execution order of page item assignments are in the page rendering process.
    Sequence (+ Region), Type of items, more clever by checking dependencies ??
    I couldn't find anything here, or looked with the wrong keywords.
    I just need to know, what reliable assumption to make about dependencies amongst page items?
    Is that visible in the APEX code? A pointer to that would be OK.
    Many thanks
    Thomas

    fac586 wrote:
    What do you mean by "assignments"?The "Source" ("Source value or expression" in combination with the "Source Type") on the Page Item [Application Express 4.1.0.00.32]
    fac586 wrote:
    Items are rendered in order of region position/region sequence/item sequence. Item values will be evaluated in this order, but may also be set by computations or processes which run in order of processing point/computation sequence/process sequence.
    You can view page components in event order in the App Builder by selecting the Utilities > Page Events view in the page definition, and the actual sequence of runtime events in the debug trace.That was exactly what I was thinking, but that is not the case as far as I can tell. The order which is shown "*Utilities > Page Events*" seems to be the display order, but not necessarily the evaluation order in order to obtain the values.
    I have a database field that is shown much further down in this sequence, but I have a dependent field that is calculated based on this value and is shown before in that sequence.
    So I was wondering whether there is an implied order - possibly based on the Source Type of the page item.
    And to answer the question. There are no other computations or processes ... other than the associated "Automated Row Fetch" related to the database column used in the page items on the page.

  • [AS CS3] Bug? All Page Items - grouped items w labels

    Can anyone confirm this behaviour for me. I would classify it as a bug, but maybe the logic for it not being a bug escapes me.
    The command "all page items" is supposed to return a (flat) list of every page object, right? I would suspect that I should be able to address any object in the list. But I can only seem to address an object when it's inside of a group.
    I am trying to get the text of a text frame that has a label. It may or may not be inside a group. I can certainly do a try/error block to try a script statement for objects in a group or not in a group. But I think that "all page items" should be able to handle it directly.
    Here's a test script: ------
    tell application "Adobe InDesign CS3"
    tell document 1
    get label of all page items
    set myUngrouped to contents of text frame "some label" --only works when objects ungrouped, this is expected
    set myText to (get contents of text frame "some label" of all page items)
    --both statements work ONLY when objects grouped
    set myText to (get contents of every page item of all page items whose label is "some label")
    end tell
    end tell
    Steps:
    Make a new document.
    Draw a text frame. Type some text into it.
    Label the frame "some label".
    Draw another empty graphic or text frame.
    Run script
    -->result is, myText statements error out. Why is this?
    Now group all items on page.
    Run script.
    -->result is, myUngrouped can't continue. This is expected.
    Comment out myUngrouped statement
    Run script.
    -->result is, myText statements work OK.

    On 19/8/08 1:14 AM, "SuperMacGuy" <[email protected]> wrote:<br /><br />> set myText to (get contents of every page item of all page items whose label<br />> is "some label") <br /><br />The syntax is a bit tricky. The key is that all page items returns a list,<br />so what you want is certain items -- not page items -- from that list. So:<br /><br />set myText to (every item of all page items whose label is "some label")<br /><br /><br />-- <br />Shane Stanley <[email protected]>

  • Align page items (AS) (CS3)

    Scripting Gurus,
    Is there some simple AS syntax to align selected page items on a page?
    Dictionary seems to imply that, saying:
    align distribute items page item : The page items to align or distribute.
    align option left edges/top edges/right edges/bottom edges/horizontal centers/vertical centers : The type of alignment to apply.
    I attempted this:
    tell page items in selection
    set vertical alignment to top edges
    end tell
    Thanks!
    Joe

    Its kinda of crazy but here ya go, I wish the AppleScript Dictionary listed  examples ...esp. when the syntax is wacky.
    select a bunch of images, or have the object references in a list(I just use selection to make it easier):
    tell application "Adobe InDesign CS3"
        tell active document
            set myimages to selection
            align align distribute items myimages align option left edges
        end tell
    The text in the red is where you put those paramaters listed in the dictionary.
    ~Mike

  • [AS][CS3] duplicate page items in a specific position on another doc

    Hello,
    I need to copy or duplicate page items of the active page of doc 1 in a specific position of the active page of doc 2.
    I can duplicate the page items of doc 1 into the doc 2 (with the code below) but can't find a way to duplicate them in a specific position: they are always duplicated in the same position on the active page of doc 2.
    The current working code (simplified) is:
    tell application "Adobe InDesign CS3"
    tell document 1
    tell layout window 1
    set pageitemlist to every page item of active page
    end tell
    end tell
    duplicate pageitemlist to the active page of layout window 1 of document 2
    end tell
    Thanks for your help!

    -- This works in CS4:
    tell application "Adobe InDesign CS4"
    tell document 1
    tell page 2
    set d to duplicate page item "textframe1" -- the text frame labeled "textframe1"
    -- FYI, d has a class of list:
    -- "text frame id 328 of page id 237 of spread id 232 of document "Untitled-2" of application "Adobe InDesign CS4""
    end tell
    move d to page 4 -- moves to 0,0 on pg4
    end tell
    end tell

  • [CS3 JS] Getting a page item by its script label

    I have a text frame on a master page with its script label set. In my script, I am trying to get a reference to the text frame with this:
    var doc = app.activeDocument;
    var spread = doc.masterSpreads[0];
    var tabFrame = spread.allPageItems.item("TabLeft");
    I get the error "spread.allPageItems.item is not a function"
    Any help will be appreciated. Thanks.
    Rick

    Hi Rick,
    spread.allPageItems returns a flattened array of all of the page items in the spread, at any level of the hierarchy (i.e., inside groups and other page items). Is that what you want? Sadly, allPageItems does not benefit from the special case where we use the label as a name, so you'll have to iterate if that's what you want.
    As Peter says (thanks, Peter!), spread.pageItems.item("label") gives you all of the page items whose label matches the string, but it does so in sort of a weird way--you'll always get a page item object. If no page items match, you get an invalid page item; if one matched, you get a single page item, and if multiple page items matched, you get a page item object that actually contains multiple page items. It can take a little testing to figure out exactly what it is that was returned.
    Thanks,
    Ole

  • [JS CS3] disappearing page items

    Now this is strange: I've written a script that does some imposition of a an image on a single sheet (page) and puts some special printers marks along the side. Now there's (as far as i am aware of) one instance where all the page items get placed on the page, but when you save, close and reopen the document, half of them are gone!
    When you drag the page items before saving they disappear right from under your cursor! I've tried putting a lot of save commands during the script, hoping that that would nail those items down, but with no luck.
    Has anybody had a similar experience and found a solution?
    Thanks,
    james

    Hi,
    You should send your script then we could have a try on our side.
    Loic

  • CS3: Rotated page item: How can I get the top-right point

    Hi
    I have a rotated page item. Now I should have the top-right and the bottom left point. If I get the rectangle of this page item I only have the top-left and the bottom-right point. And I can read the rotation angle.
    - How can I get the missing points?
    Thanks
    Hans

    Algorithmically speaking (ie, this is NOT real code), isn't it just something like:
    if page.rotationAngle == 90 then
    origTopLeft = (newBottomRight.Y, newTopLeft.X);
    else if page.rotationAngle == -90 then
    origTopLeft = (newTopLeft.Y, newBottomRight.X);
    else if page.rotationAngle == 180 then
    origTopLeft = newBottomRight;
    else
    origTopLeft = newTopLeft;

  • [CS3 Server] Page items copy problem

    I'm trying to copy page items from one document to other. I use kCopyCmdBoss command.
    Command processes successfully but extra pages are generated in destination document and InDesign fails after opening it.
    What could be a problem?
    Thanks in advance.

    -- This works in CS4:
    tell application "Adobe InDesign CS4"
    tell document 1
    tell page 2
    set d to duplicate page item "textframe1" -- the text frame labeled "textframe1"
    -- FYI, d has a class of list:
    -- "text frame id 328 of page id 237 of spread id 232 of document "Untitled-2" of application "Adobe InDesign CS4""
    end tell
    move d to page 4 -- moves to 0,0 on pg4
    end tell
    end tell

  • CS3/CS4 - Preview of page item = Crash in rare cases

    Hi,
    I'm wondering about how the to draw a preview of a page item, in the most correct way. Currently im using the SnapshotUtils like:
    SnapshotUtils ex(somePageItemRef,scaling,scaling);
    And then:
    AGMImageRecord* fpCurAGMImage = (AGMImageRecord*)ex.CreateAGMImageAccessor()->GetAGMImageRecord();
    to obtain an AGMImageRecord that I can draw onto an IGraphicsPort:
    PMMatrix theMatrix;    // No transform
    gPort->image(fpCurAGMImage, theMatrix, 0);
    However, one customer(PPC Mac 10.4 CS4) had a crash in this code, as seen from the partial stack trace below:
    Thread 0 Crashed:
    0   AdobeAGM                            0x01417418 AGMTerminate + 4143764
    1   AdobeAGM                            0x012b645c AGMTerminate + 2697944
    2   AdobeAGM                            0x012bc3e8 AGMTerminate + 2722404
    3   AdobeAGM                            0x012be210 AGMTerminate + 2730124
    4   AdobeAGM                            0x0120b8d4 AGMTerminate + 1998672
    5   AdobeAGM                            0x01030150 AGMTerminate + 51148
    6   ...adobe.InDesign.AppFramework      0x114f48c8 GetPlugIn + 118040
    7   ...adobe.InDesign.AppFramework      0x114f4b30 GetPlugIn + 118656
    8   com.adobe.InDesign.MyPlugin              0x0e405778
    MyCustomView::Draw (IViewPort*, __HIShape*) + 1560
    I can see in the documentation that the GetAGMImageRecord function should not be called any more as of InDesign 3.0, however I cannot figure out another way of obtaining an object that i can draw onto the IGraphicsPort? Is there a more preferred solution?
    I Hope somebody can help on this one
    Thanks!
    Kind regards Toke

    Hi Toke,
    I do not have any experience with this sort of stuff ;-(
    However have you noticed the sdk sample transparencyeffect which still uses GetAGMImageRecord even with CS4. Maybe the sample code sheds some light on your problem.
    Best,
    Peter Schülke

  • CS3 / Win: Observe copy/paste action of a page item

    Hi
    I like to observe the manual copy and paste of a page item.
    How can I do that?
    What do I have to attach to the observer?
    I get the action kAddToHierarchyCmdBoss and kNewPageItemCmdBoss when I copy and paste a page item. this works.
    Now the problem:
    In the text story of my page item there is a table. I can get the number of tables and the ITableModel of the text story in my application, thats not a problem. But I can't get the ITableModel in my observer (kAddToHierarchyCmdBoss ) if I paste the page item. The interface is always nil. I don't know why and I am looking for a solution.
    Maybe the text story is not finished when I get the kAddToHierarchyCmdBoss.
    Is it possible to observe if a text story is finished? I mean the copy of a text story is finished.
    Thanks a lot.
    Kind regard
    Hans

    I am checking in myDocObserver cmd->GetCommandState() == ICommand::kDone?

Maybe you are looking for

  • Can I use ICloud to store all my data and use it seamlessly with my devices and Mac?

    Can I use ICloud to store all my data and use it seamlessly with my devices and Mac.  I.E. I want to use it as I use my time capsule and get rid of all this stuff I have in my office.

  • Objective-C class without base class

    I'm in doubt about the sense of letting a class to have no base class (neither NSObject nor Object). I have observe that in this case you could not send messages to the object, so you can't use: Point* p =[[Point alloc]init]; But you can use: Point*

  • New in oracle

    hi friends, i am new in oracle application. i got training in oraacle application. now i am going to trian up in dba. could u give good advice for me? and how to become a good dba? sugges some books for dba? w z future

  • Guest Server - Self-Service login page

    Hi Has anyone managed to customise the spash page users see when they login ? We are trying things like stopping the "access plan" from displaying and the phone country code to default to 44 and not +1. Any guidance would be appreciated. Thanks

  • Problem matching parameters in a method

    Hi, all: I'm processing a LOT of data for some research. I have millions of lines of data I've generated and am working with. I've created a class that lets me do the things I need to with my data. In that class, I analyze the data (lines of several