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

Similar Messages

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

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

  • I recently added my old mac hard drive to a new macbook with an SSD as my main OSX drive.  I am having trouble with permissions in viewing my old hard drive.  What is the best way to get complete access to my old hd installed in my new Macbook?

    I recently added my old mac hard drive to a new macbook with an SSD as my main OSX drive. I am having trouble with permissions in viewing my old hard drive, when I save a permission when I reboot the full access is changed again .  What is the best way to get complete access to my old hd installed in my new Macbook?

    Open the Get Info window for the old drive. Click the Lock icon on the bottom of that window and type in your password. In the permissions area click the Plus sign ( + ) and Add your Username to it and set it to Read & Write. Close that window. you should now have full access to all the files.

  • What is the BEST way to get my macbook with lion on it, to communicate with my Canon 40D camera?

    What is the BEST way to get my macbook with lion on it, to communicate with my Canon 40D camera? It says the utility disk is a PowerPC app and that is no longer supported. What do I do now? I can't upload photos from my camera.

    Also, I had the same problem happen when I tried to install an older version of Corel Painter. Are Macbook Pro users just NOT supposed to be able to use their laptops for the purposes they are best designed for?
    -Frustrated new Mac user

  • Iphone 4s coming friday, what is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across.

    What is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across. If I do a restore as I have when previously from one iphone to another it has shown (in settings, usage) the cumulative usage from previous phones so all the hours of calls on all previous iphones will be displayed even though its brand new. Anyone know how I can get my notes (from standard iphone notes app) to my new iphone 4s without restoring from previous iphone 4. Thanks for any help offered.

    First, if you haven't updated to iTunes 10.5, please update now as you will need it for the iPhone 4S and iOS 5.
    Once you're done installing iTunes 10.5, open it. Connect your iPhone to iTunes using the USB cable. Once your iPhone pops up right click on it. For example: an iPhone will appear and it will say "Ryan's iPhone."
    Right click on it and select "Backup" from the dropdown menu. It will start backing up. This should backup your notes.
    Please tell me if you have any problems with backing up.
    Once you backup and get your iPhone 4S, you must follow these steps. If you don't follow these steps, you will not be able to get your notes on your new iPhone 4S.
    Open up iTunes again then right click on your device (iPhone 4S). Once you do you will see a dropdown menu. It will say "Restore from Backup..." Select this and it'll ask for a backup, select it from the dropdown menu. For example "Ryan's iPhone - October 12, 2011." Pick that and it will restore to your backup. Do this when you get your iPhone 4S so you will not lose anything. Even though you're restoring, you're getting back, since you're getting the previous settings, notes, contacts, mail and other settings from your old iPhone. You'll still have Siri though! So, restore when you first get it. Also frequently backup your device, as it will be worth it. You can restore from a backup if something goes wrong or save your data for a future update.
    Once you do that, you should have your notes on your new iPhone 4S and iOS 5.
    Please tell me if you need any help.
    I hoped I answered your questions and solved your problem!

  • What is the best way to get a copy of Final Cut 7?  I don't see it on Apple's site anymore and I was told I needed to get ahold of Apple's Pro Divison?

    What's the best way to get a copy of Final Cut 7?

    Amazon.
    Apple stoped selling it officially 20 months ago.

  • HT4260 I have an AirPort Extreme and a linksys router. What is the best way to get 6-8 wired connections with ac speeds?

    I have an AirPort Extreme and a linksys router. What is the best way to get 6-8 wired connections with ac speeds?
    Appreciate your assistance.

    The answer depends on whether the AirPort Extreme is your main router....or...the Linksys device is your main router.
    In either case, the two devices must connect together using a wired Ethernet connection using CAT5e or CAT6 cabling.
    Any version of the AirPort Extreme produced within the last 5 years will have Gigabit Ethernet ports. In order to get the same speeds from the Linksys router, it will also need to be Gigabit Ethernet capable.
    If you need additional Ethernet ports, you will need to add a Gigabit Ethernet switch to either the AirPort Extreme or Linksys router.
    It is assumed that your other devices connecting to the AirPort Extreme and Linksys router will also have Gigabit Ethernet capability.
    Not sure why you mention "ac" speeds in your post. This relates to wireless connections, not wired.

  • I bought CS6 extended yesterday (yes i did). I have CS4 and lots of photo's in bridge (tagged with keywords). What is the best way to get my photos from bridge cs4 to cs6? Is there a guideline how to go about so I don't loose any of my photos/keywords? Wh

    I bought CS6 extended yesterday (yes i did). I have CS4 and lots of photo's in bridge (tagged with keywords). What is the best way to get my photos from bridge cs4 to cs6? Is there a guideline how to go about: so I don't loose any of my photos/keywords? Who can help?

    The Bridge General Discussion can give you the specifics of transferring your information over to Bridge CS6.

  • When I'm done with my fcp sequence, whats the best way to get it to dvd?

    When I'm done with my fcp sequence, whats the best way to get it to dvd?

    The advice to go to Compressor left out the part that you may want to convert your audio to AC3 becaus ethe MPEG2 bitrate is probably too high for DVD specs.
    This method is in the DVDSP manual and it's in the Compressor manual, both difficult to locate, but easily searchable.
    Here's what I'd do: Export the timeline form FCP in the native sequence settings, self-contained. Bring that self-contained movie into DVDSP and let DVDSP handle the transcode.
    The advice to go to iDVD is even easier.
    bogiesan

  • Whats the best way to get dvd onto 5800

    Peoples,
    I'm strugglin to get DVD onto my noka 5800. It's not obvious in the user manual and looking around the web i need to 'convert' it to the fim on.
    Please does anybody have an easy, fool proof way of doing this??????
    Message Edited by blueleaches on 21-Aug-2009 06:02 PM

    If its possible there should be some walkthrough's on google. 
    http://www.lmgtfy.com/?q=whats+the+best+way+to+get+dvd+onto+5800 

  • Whats the best way to get a big text file in a CLOB variable?

    Hi,
    I have a very premitive type of question.
    I have a big text file, say 30 MB, in a Unix directory (Solaris). I want to get the whole text of that file in a CLOB variable.
    I saw the procedure dbms_lob.loadfromfile/loadclobfromfile. In both these cases, according to the documentation, the target where is collect the data will be a BLOB and not a CLOB. So, I have to convert that blob into a clob.
    If I want to avoid all this conversion process, whats the best way to get a text from a file into a CLOB variable?
    Please suggest.
    Regards

    In addition, LoadFromFile is overloaded to handle both BLOB and CLOB:
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       BLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT
    <BR>
    PROCEDURE LOADFROMFILE
    Argument Name                  Type                    In/Out Default?
    DEST_LOB                       CLOB                    IN/OUT
    SRC_LOB                        BINARY FILE LOB         IN
    AMOUNT                         NUMBER(38)              IN
    DEST_OFFSET                    NUMBER(38)              IN     DEFAULT
    SRC_OFFSET                     NUMBER(38)              IN     DEFAULT

  • Whats the best way to get the server name in a servlet deployed to a cluster?

              Hi,
              I have a servlet in a web application that is deployed to a cluster, just
              wondering what is the best way to get the name of the node that the server is
              running on at run time??
              Thanks
              

              Please try to modify the following code and test for your purpose: (check Weblogic
              class document for detail)
              import javax.naming.*;
              import weblogic.jndi.*;
              import weblogic.management.*;
              import weblogic.management.configuration.*;
              import weblogic.management.runtime.*;
              MBeanHome home = null;
                   try{
                        //The Environment class represents the properties used to create
                             //an initial Context. DEfault constructor constructs an Environment
                             //with default properties, that is, with a WebLogic initial context.
                             //If unset, the properties for principal and credentials default to
                             //guest/guest, and the provider URL defaults to "t3://localhost:7001".
                             Environment env = new Environment();
                             //Sets the Context.PROVIDER_URL property value to the value of
                             //the argument url.
                             if(admin_url!=null){
                                  env.setProviderUrl(admin_url);
                                  //Sets the Context.SECURITY_PRINCIPAL property to the value of
                                  //the argument principal.
                                  env.setSecurityPrincipal(username);
                                  //Sets the value of the Context.SECURITY_CREDENTIAL property to
                                  //the value of the argument cedentials
                                  env.setSecurityCredentials(password);
                                  //Returns an initial context based on the properties in an Environment.
                                  ctx = env.getInitialContext();
                             }else ctx = new InitialContext();
                             home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                             ctx.close(); //free resource
                             // or if looking up a specific MBeanHome
                             //home = (MBeanHome) ctx.lookup(MBeanHome.JNDI_NAME + "." + serverName);
                             DomainMBean dmb = home.getActiveDomain(); //Get Active Domain
                             ServerMBean[] sbeans = dmb.getServers(); //Get all servers
                             if(sbeans!=null){
                                  for(int s1=0; s1<sbeans.length; s1++){
                                       String privip = sbeans[s1].getListenAddress();
                                  sbeans[s1].getName();
                             sbeans[s1].getListenPort();
                                                 WebServerMBean wmb = sbeans[s1].getWebServer();
                   }catch(Exception ex){
              "Gao Jun" <[email protected]> wrote:
              >Is there any sample code? Thanks
              >
              >Best Regards,
              >Jun Gao
              >
              >"Xiang Rao" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Sure. You can use the Weblogic management APIs to query ServerBean.
              >>
              >>
              >> "Me" <[email protected]> wrote:
              >> >
              >> >Thanks for your reply, i was hoping to find a better way for example
              >> >a class in
              >> >weblogic API.
              >> >
              >> >Thanks
              >> >
              >> >"Xiang Rao" <[email protected]> wrote:
              >> >>
              >> >>Physical: InetAddress.getLocalHost().getHostName()
              >> >>Weblogic: System.getProperty("weblogic.Name");
              >> >>
              >> >>
              >> >>"Me" <[email protected]> wrote:
              >> >>>
              >> >>>Hi,
              >> >>> I have a servlet in a web application that is deployed to a
              >cluster,
              >> >>>just
              >> >>>wondering what is the best way to get the name of the node that
              >the
              >> >>server
              >> >>>is
              >> >>>running on at run time??
              >> >>>
              >> >>>Thanks
              >> >>
              >> >
              >>
              >
              >
              

  • What is the best way to get a time capsule to work with a new network name?

    What is the best way to get a time capsule to work with a new network name?

    Well it seems that you did not explain to us the full story.  Did you change ISP's or something? Why would it not show up anymore?
    What colour is the light on the time-capsule? If it's blinking amber, then you probably need to do a factory-reset. That should get it to show up again in AirPort Utility.

  • What is the best way to get dirty my hand with office 365

    what is the best way to get dirty my hand with office 365
    Anil MCC 2011,ITIL V3,MCSA 2003,MCTS 2010, My Blog : http://messagingschool.wordpress.com

    Hi,
    Just create an evaluation tenate and get your hands Dirty! Or if you are a partner to Microsoft, you can register yourself at
    http://portal.fasttrack.office.com and then you can create sites from there. If you need tenant with data, use
    http://microsoftcie.com and create a tenant, then you will have your own contoso to play with! :) 
    Regards
    Henrik A. Halmstrand
    sharepointrevealed.com
    getspconfig.codeplex.com
    Please click Mark As Answer; if a post solves your problem or Vote As Helpful; if a post has been useful to you.

Maybe you are looking for

  • ClearType makes fonts in Dreamweaver code view hard to read

    I'm using Dreamweaver 8.0.2 with Windows Vista Business. As you know, Vista has a feature called "ClearType," which is supposed to help smooth out the on-screen fonts. It normally does do this, but for some reason, in Dreamweaver code view, some of t

  • Odd firewire ipod behavior

    So, I've been having a problem with my ipod photo 60gb for quite some time now - syncing photos. Finally thought I need to figure out the problem. The symptons were that it would take ages to sync my photos, but would eventually finish. Once I unplug

  • Standard Error Bars in charts

    I would like to know if anyone has used std. error bars (as in statistics) in column or bar charts and how that was accomplished. I didn't see anything about it in the flex docs.

  • Returning Non Serializable Objects

    Is it possible in anyway to return non serializable objects from the remote method of an EJB, for instance return a result set. Everytime i try, i get a CORBA marshalling exception, i tried to put the resultset in a serilized object such as an enumer

  • How many physical Network Adapter required for to implement NVGRE Gateway ?

    Hello Guys, Would like to know how many physical Network Adapter required to implement network virtualization including the technologies such as Windows Azure Pack| system center 2012 R2 & Hyper-V 2012 R2. Thanks  NM-BG