[CS3] Getting object style used by a page item

If I have a UIDRef of a multi-column text frame, how can I get the object style applied to it? It looks like there was a thread on this previously but it seems to have been pruned from the list.
Thanks.

IID_IOBJECTSTYLEINFO
For setting, you will need kApplyObjectStyleCmdBoss, the IID_IUIDDATA points to the style. As that command does not update the attributes, you'll also need a bunch of other commands, I'd watch out for a Facade instead.
Dirk

Similar Messages

  • CS3: Applying Object styles not always consistent

    Hello,
    I have a number of Object Styles, each of which have different Paragraph Styles called out. In turn, each of these Paragraph Styles calls out different fonts, font styles and sizes.
    Most of the time I can click on a text frame and all the parameters in the Object style are applied--just as it is supposed to be.
    But sometimes the font that the text is supposed to change to does not get applied. This seems to be inconsistent but there is probably an underlying order to it that I do not see.
    So why would an Object style not apply the Paragraph style that is called for in the Object style options?
    Thanks,
    Tom

    I now see the problem, though I do not know the solution.
    If I open up a new document and create a text frame, the font is that old ugly but familiar Times-Roman 12 point.
    But if I open up the template where I have many object, paragraph and character styles, one of each of these is already selected. I can either see this by opening the respective panels or above in the control panel. In fact, any text frame I create always has a top text inset.
    So my Preferences in general are OK and I'd rather not dump them. The problem is that styles are already selected upon opening this one ID file. How do I turn that off?
    In  answer to a question above, I do not simply redo the old Quark file, now in ID. I have a series of styles that are just much easier to apply in a separate ID file, rather than reinventing them in the Quark-to-ID file.
    Thanks for your questions and ideas. They helped me probe this deeper. Now I just need a solution to what I think is a simple problem (still eludes me tho!)
    Tom

  • How To Use a Hidden Page Item within an SQL Report Query without Submitting

    Hi,
    Using: Oracle ApEx 3.0.1
    I have an sql report region that contains a hidden page item as part of the "where clause". My problem is, based on a value entered by the user, I need to assign this value enetered to my hidden item, so that it can be used within the where condition of my sql but this would need to be done without actually submitting the form.
    At the moment, I can set the value via an on-demand process but my SQL is still not returing any values as the hidden page item within the query is not set (as page has not been submitted).
    Can anybody please assist as I am not sure how to do this and whether in actual fact, this is possible to do, without having submitted the page.
    Thanks.
    Tony.
    Edited by: Tony F. on Nov 12, 2011 1:39 AM

    You can set a session value using a dummy ajax call e.g:
    Add the following to the 'Function and Global Variable Declaration' region
    function f_set_item(pThis){
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',1);
      get.add('P1_ID',pThis.value)
      gReturn = get.get();
      get = null;
    }Where P1_ID is the session value to be set. Then call the function in the usual way e.g.
    javascript:f_set_item(this);
    I hope that helps
    Shunt

  • Getting incorrect coordinates, width/height of page-item in actionscript.

    Hi,
    I am developing a Flex extension for InDesign CS5. I am trying to get the coordinates and width/height of a page-item. But, I keep getting incorrect data. Please refer screenshot. The coordinates as I see in the InDesign application are 38.8, 66.02, 117.5, 160.5.
    I used the geometricBounds method to get the coordinates and width/height, but I am getting 29.70, 40.26, 222.07, 178.11. Please refer the screenshot.
    I read somewhere that the coordinates can change with respect to the ruler settings, i.e., it depends on Ruler per Spread, Ruler per Page or Ruler on Spine. But, I couldn't find anything related to this with respect to actionscript.
    How can I get the coordinates and width/height that I see in the InDesign application through actionscript?
    Thanks!

    @poortip87 – make a rectangle with the coordinates ActionScript is suggesting on your page together with your placed image. Then you can see how this correlates to the path points of the rectangle that holds the image.
    Further reading on geometricBounds and their relationship to other geometric properties of page items can be found here:
    Marc Autret:
    Work Around the Width/Height Gap
    http://www.indiscripts.com/post/2009/10/work-around-the-width-height-gap
    Uwe

  • Problem with using sql with page items

    Hi
    I have a simple query that when i enter this works
    SELECT SUGGESTION_ID, SUPERVISOR_ID, OVERVIEW
    FROM PROJECT_SUGGESTION
    WHERE SUPERVISOR_ID = 1;
    But when i enter this doesnt
    SELECT SUGGESTION_ID, SUPERVISOR_ID, OVERVIEW
    FROM PROJECT_SUGGESTION
    WHERE SUPERVISOR_ID = &P12_SUPERVISOR_ID;
    Even though the value of the page item supervisor_id for page 12 is 1.
    Anyone know why this is or another way i can refrence the page item?
    thanks
    Dan

    Instead of &P12_SUPERVISOR_ID
    try
    :P12_SUPERVISOR_ID
    And i think when you used the & you follow it with a period. ie. &P12_SUPERVISOR_ID.
    Just a guess.
    Mike

  • What is the best way to get the UID of any selected page item (frames, rectangle etc)?

    I need UID of any selected item on page and also array of UID's in case multiple selection happens. How can I achieve it?
    One way I know is to write an observer and attach it on every new page Item created, but that way the system might become slow and also
    the behavior will be unpredictable in case of multiple selections.
    Can some one suggest a better way to do it?

    The selection subsystem hides most ideas of direct adressing (e.g. UID of page item(s) or story) into the concrete selection, while from the outside you only work on the suite interfaces of the abstract selection. So you don't ask whether the selection is some kind of page item and you don't peek at the actual items. Instead you ask about their capabilities and applied values.
    Attaching observers to page items has nothing to do with the selection, because they only notify about changes on those page items - which could also be caused by scripts or anything else. Even then, the most relevant changes go thru the kDocBoss as single point to attach an observer, rather than thru all those page items.
    Regarding speed - the selection has many optimizations, for example "lazy" notifications can be deferred until they become appropriate for an UI update, they might even become aggregated / optimized away.
    One starting point into the selection when you come from nowhere would be ISelectionUtils. Your selection observer might also pass interesting parameters.
    Dirk

  • Frame fitting options in object styles

    We are producing multiple pages using tagged templates and importing xml - to populate both text and images.
    Back in CS3 - our object styles using frame fitting worked perfectly. Since we have upgraded to CS5 and now CS6 - when xml is imported the frame fitting element of our object styles are no longer being honoured - when clicking on the object frame, it shows the style has been applied but with overrides - and it is adding random offsets to the frame fitting crop settings.
    We are producing large numbers of pages through xml automation, therefore it's very time consuming to open every page and clear overrides/reset frame fitting on every affected graphic.
    I've seen on other questions/forums that this may be a known bug - anyone have any up-to-date info on fixes or workarounds?
    Thanks for your help :-)

    Hello,
    We have a free startup script that clears the overrides after a place action.
    http://www.kerntiff.co.uk/free-stuff/afterplaceobjectreseter
    P.

  • [CS3/4, JS] Apply feather using an object style

    I was hoping to apply transparency effects via an object style using this:
    myObjectStyle.objectStyleContentEffectsCategorySettings.enableFeather = true;
    But "Object does not support the property or method..." etc.
    I'd be very grateful if someone could point me in the right direction.
    Thanks in advance -- Jeremy

    Yes, I had got that far by stumbling blindly through the undergrowth, but it still seems to leave feather switched off, according to the Object Styles Panel, and my fumbling attempts to adjust choke, noise, etc. do not seem to have any effect, so I think it really must be switched off. What gave you the impression that that line was successfully switching feather on?
    Partly, my difficulties stem from the fact that I find the Extendscript Toolkit CS4 Object Model Viewer incomprehensible. I mean, take a look at the picture below. What is "Object Model Object Model Object Model Object Model", supposed to mean, and why is every version of InDesign labelled "CS4"?

  • [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

  • How to get UIDRef of the selected page item in indesign cs3

    Hi,
        I want to get the UIDRef of the selected page item like Rectangle Frame. Can you show me the complete code snippet to get the UIDRef of selected Rectangle Frame. I need this UIDRef for getting the geometric bounds properties(width and height) of the selected rectangle frame to display the user in dialog box.
    Regards,
    K.Saravanan.

    Hi,
    UIDList selection;
    InterfacePtr<ISelectionManager> pSelectionManager(Utils<ISelectionUtils>()->GetActiveSelection(), ISelectionManager::kDefaultIID);
    if(pSelectionManager == nil){
    break;
    InterfacePtr<ILayoutTarget> pLayoutTarget(pSelectionManager->QueryConcreteSelectionBoss(kNewLayoutSelectionBoss), ILayoutTarget::kDefaultIID);
    if(pLayoutTarget == nil){
    break;
    selection = pLayoutTarget->GetUIDList(kDontStripStandoffs);
    Then, you can use this interface "IGeometry" to get information about spline size.
    InterfacePtr<IGeometry> pGeometry(selection.GetRef(i), IGeometry::kDefaultIID);
    if(pGeometry== nil){
    break;
    PMRect splineBounds = pGeometry->GetStrokeBoundingBox();
    PMReal width = splineBounds.Height();
    PMReal hight = splineBounds.Width();
    Regards,

  • Object Style

    How do I make an object style which generates a fixed size frame (100mmx60mm for e.g.)? And is it possible to then make that box appear at a fixed point on a page? I have tried to create this using object styles and using the anchoring options, but cannot get it to work...

    Sounds more like a case for a library item than an object style (though you can apply an object style when you create the item). Possibly a snippet would be able to make it appear at the fixed location, though I'm not sure about that.

  • [AS CS3] getting the xml value?

    I'm having trouble returning the "Value" of my xml object. I can get all sorts of other attributes. I need to be able to return the value "123456". I must be missing something, or is this a real shortcoming?
    tell application "Adobe InDesign CS3"
    tell document 1
    get associated XML element of first page item
    --> XML element id 12 of XML element id 2 of document "Untitled-8"
    get XML attribute 1 of associated XML element of first page item
    --> XML attribute "TCnumber" of XML element id 12 of XML element id 2 of document "Untitled-8"
    get properties of (get XML attribute 1 of associated XML element of first page item)
    --> {value:"123456", parent:XML element id 12 of XML element id 2 of document "Untitled-8", index:1, name:"TCnumber", object reference:XML attribute "TCnumber" of XML element id 12 of XML element id 2 of document "Untitled-8"}
    get name of (get XML attribute 1 of associated XML element of first page item)
    -->TCnumber
    get index of (get XML attribute 1 of associated XML element of first page item)
    -->1
    get value of (get XML attribute 1 of associated XML element of first page item)
    --ERROR
    end tell
    end tell

    That's a nice one.
    The "get value" event takes precedence, it is probably understood by ScriptArg.
    For insiders: kGetValueScriptArgEventScriptElement
    You can use round brackets to disambiguate:
    get (value of ...)
    Dirk

  • How to get notified when ever I select any frame (any page item) ?

    I have added a observer class in my plugin which derives from ActiveSelectionObserver.
    But my observer constructor is not getting called when i select a page item. (In short, I am not getting notified about the selection)
    below is my code:
    class CSDTSelectionObserverImpl : public ActiveSelectionObserver
    public:
      CSDTSelectionObserverImpl(IPMUnknown *boss);
       virtual ~CSDTSelectionObserverImpl();
    protected:
       virtual void    HandleSelectionChanged (const ISelectionMessage*);
       virtual void HandleSelectionAttributeChanged(const ISelectionMessage* selectionMessage);
    CREATE_PMINTERFACE(CSDTSelectionObserverImpl, kCSDTSelectionObserverImpl)
    CSDTSelectionObserverImpl::CSDTSelectionObserverImpl(IPMUnknown *boss) : ActiveSelectionObserver(boss,IID_ICSDTSELECTIONOBSERVER) { }
    CSDTSelectionObserverImpl::~CSDTSelectionObserverImpl() { }
    void CSDTSelectionObserverImpl::HandleSelectionChanged(const ISelectionMessage* selectionMessage) { }
    void CSDTSelectionObserverImpl::HandleSelectionAttributeChanged(const ISelectionMessage* selectionMessage) {  
    if (selectionMessage && selectionMessage->WasSuiteAffected(IID_ILAYOUTSELECTION_ISUITE))
    Also, In my .fr file, I have added below:
    AddIn
      kDocBoss,
      kInvalidClass,
        IID_ICSDTSELECTIONOBSERVER, kCSDTSelectionObserverImpl,
    Do I need to implement the ILayoutSelectionSuite as well to get the notification on page item selection or implementing Observer via ActiveSelectionObserver is sufficient?
    Please help.

    I tried below in debug mode , but it gave me error while execution (when the line of code was called by in-design)
    InterfacePtr<ILayoutSelectionSuite> iLayoutSelectionSuite(fCurrentSelection, UseDefaultIID());
            if (iLayoutSelectionSuite == nil)
                break;
    iLayoutSelectionSuite->SelectPageItems(selection,Selection::kReplace,Selection::kDontScrollLayoutSelection); // Error
    So I was not able to get the UIDList of the selected page items, hence I used below code and this is working.
      InterfacePtr<const IIntegratorTarget> iIntegratorTarget(iLayoutSelectionSuite, UseDefaultIID());
            std::auto_ptr<IIntegratorTarget::TargetSuiteCollection> selectionSuites(iIntegratorTarget->GetTarget(ILayoutTarget::kDefaultIID));
            for(IIntegratorTarget::TargetSuiteCollection::size_type i = 0; i < selectionSuites->size(); i++)
                ILayoutTarget* target = (ILayoutTarget*)selectionSuites->at(i).get();
                if(!target)
                    continue;
                selection = target->GetUIDList(kDontStripStandoffs);
    But it would have been much easier and logical if I can get it using IlayoutSelectionSuite or if there is some better approach ?
    Please let me know.
    ileleLayoutSelectio
    Let me

  • [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

  • Powershell. Concatenate varables to get object property

    Hello, please give me hint
    I want concatenate varables to get object property.
    I have Variable $Item that is Object with properties and another variable $Parametr that is String type, its value is "EmailAddress".
    When try type $Item.$Parametr dont get anything. How i should write string that to get  Object property value?

    Seems to work fine in v2 as well:
    PS C:\> $hash = @{EmailAddress='[email protected]'}
    PS C:\> $item = New-Object PsObject -Property $hash
    PS C:\> $Parametr = 'EmailAddress'
    PS C:\> $item.$Parametr
    [email protected]
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

Maybe you are looking for

  • Help to edit the output of a method please

    Hi I have a piece of code which i need to change. Currently the method connects to a socket c, and reads in a string from a method called get(String), which returns a string, i however need to change this so that the method get(String) returns a list

  • Pop up with Express document 'update was terminated' received from author.

    Hi , I am creating business partner in sold-to-party role and then creating another business partner in contact person role . after this I am creating relationship between those BPs by using FM  BAPI_BUPR_CONTP_CREATE (tried  FM BAPI_BUPR_RELATIONSHI

  • Is it possible to bypass keystroke to browser?

    I have a page with java applet. I want users to be able to press F11 to maximize their browser. Unfortunately, when focus is on applet, F11 doesn't work (Java handles it and doesn't pass it to browser). Is there a way to make F11 work? Actually, I do

  • Data look like coupled

    Hi, I'm trying to collect data from 4 different channels by using USB-6259 BNC and LabView 2009. When I try to collect them through a DAQ assistant, if there is an input from one channel (say channel 0), the data from different channels are also chan

  • Can't use genius with iTunes Match?

    I signed up for iTunes Match today and on my iPhone I can no longer find the option to make a genius playlist. The icon is no longer in the center of the song bar. Help please.