Unique identifiers for opened documents

Hello,
I am trying to find the equivalent of the Flex "Document.id" in the C++ SDK.
It seems to me that the UID of a document is always equal to 1 :
InterfacePtr<IApplication> application(GetExecutionContextSession()->QueryApplication());
InterfacePtr<IDocumentList> docList(application->QueryDocumentList());
PMString name;
for (int i=0; i < docList->GetDocCount(); i++)
     IDocument* doc = docList->GetNthDoc(i);
     if(nil == doc)
          continue;
     UIDRef myUIDRef = GetUIDRef(doc);
     UID myUID = myUIDRef.GetDataBase()->GetRootUID();//or myUIDRef.GetUID()
     doc->GetName(name);
     printf("%dth doc : %d (%s)", i, myUID.Get(), name.GetPlatformString().c_str());
In Flex, it is incremental.
Thank you,
David

UIDs are unique only within their database.
You could take the database pointer as unique value, but after close and open another document may receive the same memory location for its database. Another approach is a guid stored within the document meta data, but I don't know how InDesign will deal with duplicated files in this regard. The best would be you internally track open / close document signals and create your own completely unique IDs (with a mapping to the database pointer).
For either kind of unique value, you'd have to implement your own scripting property to hopefully expose it to Flex - assuming you go through CSXS.
Dirk

Similar Messages

  • Extracting unique identifier for illustrator layers

    Hi All,
    Multiple layers in an illustrator file can have the same name. So the layer name cannot be a unique identifier for layers. Is there a way to extract a unique identifier for layers through scripting? I saw that if the 'Identify Objects by' property (inside Preferences -> Units) is set to XML ID, all layer names, even identical ones are replaced by some unique ids. Can we extract these ids via scripting without manually changing the 'Identify Objects by' property. Basically, extraction of any unique identifier for illustrator layers would serve the purpose. I am really stuck with this and need help urgently. Any help would be highly appreciated.
    Thanks in advance.

    When I found this I noticed it changed the name of the layers in the layers pallet.
    I had not had a chance to test this with code.
    If "use XML ID" is turned on then you are not able to name layers the same thing.
    this in turn would follow through to your script using layer.name
    for existing files you would need to fix names manually or...
    I am sure it would be possible to Script.
    eg. export SVG file and pull the layer ID's from that and rename the document layers accordingly. (may be a little tricky for sublayers, but top level layers should be straight forward)
    Then as long as "use XML ID" is left on the files would not need this run again as you cannot use duplicate layer names.

  • Generate Document Identifiers for each document

    Hi,
    I need to generate document identifiers for each document that is uploaded to the site.
    Now I am getting a bit confusion i.e.
    Should I create derived class that inherits from the Microsoft.Office.DocumentManagement.DocumentIdProvider abstract class and then implement all abstract members or
    Should I create derived class that inherits from the abstract class named Microsoft.Office.DocumentManagement.DocumentIdProvider and then override all of the virtual members
    Please share your ideas/thoughts on the same.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    I would prefer you use Inbuild feature of sharepoint:
    http://office.microsoft.com/en-in/sharepoint-server-help/enable-and-configure-unique-document-ids-HA101790471.aspx
    http://msdn.microsoft.com/en-us/library/office/ee559302(v=office.14).aspx
    Use below article to get and attach that Unique id:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/b836a2b0-50f0-4f0a-8efd-4c713f6ed610/how-to-get-the-documentid-programmatically?forum=sharepointgeneralprevious
    You can also create documents sets programmatically:
    http://www.dotnetsharepoint.com/2013/10/how-to-create-document-set.html#.Uyu-faiSxEs

  • How do I change the default settings for opening documents on my macbook?

    Hi I would like to know how to change the default settings for opening documents on my macbook. Everytime I try to open a doc. it automatically opens with Textedit, instead of Pages or another program.

    Select any particular document you wish to fix. Press COMMAND-I to open the Get Info window. In the Open With section select the desired Default Application from the dropdown menu. Click on the Change All button to extend the change to all similar documents.
    You can only assign one default application to one type of document.

  • Captivate 3 support for Open Document format?

    Hi,
    Does anyone know about support for Open Document Format in Captivate 3? (OpenOffice presentations)
    Is it possible to save OpenOffice presentation in open document format or does it have to be saved as microsoft power point file?
    What about Captivate 4? Any improvement?

    On the OpenOffice.org site, look under projects, and there's an Open Document Toolkit for Java. I've no idea of its status though.

  • Why is there no eprint support for open document formats, such as those produced by openoffice

    Why doesn't the eprint service support open document formats? This should be a minimal requirement!

    Sorry, as important as this issue is to all of us who use Firefox, this is a Firefox support forum - not an appropriate place to start a discussion like this.
    I'm locking this thread for two other reasons though. <br />
    # An appropriate hyperlink to the original article wasn't provided.
    # Copy and paste from the original article without quotation marks or proper attribution.

  • Options for opening documents?

    Hi,
    I've recently installed version 9 of the reader and it seems to have changed the way it handles documents when you open them. When I go to File | Open and select a new document is there any way to get it to open in the existing window? Right now it creates another window and after I've opened half a dozen documents this gets a bit annoying. Is there any way to tell it to use the same window for every document?
    This is on Windows XP sp3 with dual monitors. It would also be nice if it opened documents on the same display. Right now it opens the first document in the same display that was in use when I closed the Reader last time I used it. But subsequent documents open on the primary display. I would expect that fixing the first question will solve this issue too.
    Thanks in advance,
    Linn

    > Is there any way to tell it to use the same window for every document?
    Not possible with Adobe Reader 9.

  • How do I make Microsoft Office my default for opening documents?

    Is there a way to have all word documents and pages documents only open up in word?
    As well as excel documents?
    Some of my documents open in word and others open in pages by default. I want them all to be the same, and to only open in Microsoft Office programs.
    I have the new imac with OSX 10.9
    Thanks!

    Microsoft Office can't open documents saved in the native Pages format. For compatible document types, select one of them in the Finder, choose Get Info from the File menu, click on Open With, select the desired application, and press the Change All button.
    (93962)

  • Unique identifier for a query

    Hi,
    Two queries existed with the same definition, technical name and description in our dev. box.
    Please let me know a unique identifier so that I can differentiate between these two queries.
    Regards
    Mukul

    HI,
    two queries having same technical names in the syatem.is this sure...Plz check once again the Technical names will vary ....It is tha unique identifier to differentiate...if not check with infoprovider on which they are created...
    Thanks/Tarak
    Edited by: Tarak on Feb 6, 2009 6:16 AM

  • Missing fonts not identified in open documents

    Adobe documentation states that when a document is opened that uses uninstalled fonts, a message will identify the missing fonts and offer to use font substitution. This is not what happens when I open such a document in Photoshop CS3. The warning message does not identify the missing fonts, nor can I click the offending text to get this information because font substitution happens automatically before the file is opened. The result is that I have no idea, in some cases, which fonts are missing. This is incredibly dumb!
    How can I get Photoshop CS3 to tell me which fonts are missing? Thanks!

    Unfortunately, Photoshop DOES substitute fonts. My files most definitely never specified Myriad Pro (which is what all the type in these documents has been converted to) or anything even remotely resembling Myriad Pro. What Photoshop does not do is provide a way to specify the font substitution settings at all.
    As for Suitcase, it has its limitations; but honestly, I am unimpressed by every one of the font management programs out there. I have not had activation problems with Suitcase Fusion in the past, but who knows? Maybe I'll have better luck if I try to open my files in Photoshop CS. Thanks for your feedback!

  • Right Click "Get Info"-style function for OPEN Documents

    Often I'll open an item (most commonly a Pages doc.) through Spotlight, and not knowing where the item is necessarily filed, not even sure if it's Mac vs. iCloud, I would love a way to bring up the pertinent information on this already open item, the kind of info you could get by Right Clicking the item in Finder (see the problem - I don't know where the file is - also Finder searches seem increasingly useless for some reason.)   I've searched through toolbar, right clicking, etc., no joy.
    Is there perhaps a "show current document in Finder" function, the way there is for files in iTunes?  That would would be great - instant file path view in the window, Right Click Info. one step away. 
    Hopefully there's a simple answer I've overlooked, or a relatively simple workaround.  Or maybe even if if someone has any suggestions for making Finder searches work again - I'm completely stymied by the fact that it seems unable to find just about anything any more.  It was never great, but at least until recently I found it reasonably functional.  What happened?  Links to other threads welcome. 
    Thanks, peace be with you!
    Brian

    Control (right) - click on the file name at the top of the Pages window (or any other application window) and the file path will be disiplayed:
    OT

  • DMS Code for opening documents

    Hi
    I want to write a program to view and change documents uploaded through DMS(tr CV01n,CV02n,CV03n).
    Can anyone help me with a progarm or share some knowledge regarding how to implement these requirement. Is there any class or function module to open a document.
    Thank in advance

    Hi!
    We are using the following ones (in 4.6c), they are working correctly.
    For creating: BAPI_DOCUMENT_CREATE2
    For changing:
    BAPI_DOCUMENT_GETDETAIL2 - read document details
    BAPI_DOCUMENT_CHANGE2 - change the read document
    Regards
    Tamá

  • Function module CVAPI_DOC_VIEW for opening document by webdynpro applicatio

    Hello all,
    i have a requierement to open the document when user click in filename i am using this function module but it is giving me error
    'Screen output without connection to user.'
    CALL FUNCTION 'CVAPI_DOC_VIEW'
          EXPORTING
            pf_dokar               = ls_final-dokar
            pf_doknr               = ls_final-doknr
            pf_dokvr               = ls_final-dokvr
            pf_doktl               = ls_final-doktl
         PF_HOSTNAME            = '10.141.104.40'
         pf_appl_start          = 'X'
         PF_GET_URL             = 'X'
         pf_apptp               = '1'
        PF_ASK_FILENAME        = ' '
         pf_filename            = lv_filep
        PS_FILE                =
        PF_PARENT              =
         PF_USE_DYNP            = 'X'
        PS_DRAP_AUDIT          =
      IMPORTING
        PFX_FILE               =
        PFX_URL                =
        PFX_VIEW_INPLACE       =
       EXCEPTIONS
         error                  = 1
         not_found              = 2
         no_auth                = 3
         no_original            = 4
         OTHERS                 = 5.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.

    Hi Shilpi,
    I had the same error.  I got round them by pulling parts of the FM out as below
        call function 'CV120_DOC_GET_APPLICATION'
          exporting
            pf_dokar  = ls_drad-dokar
            pf_doknr  = ls_drad-doknr
            pf_dokvr  = ls_drad-dokvr
            pf_doktl  = ls_drad-doktl
          importing
            psx_file  = lv_file
          exceptions
            not_found = 1
            no_auth   = 2
            error     = 3
            others    = 4.
        concatenate 'file://' lv_file-filename into lv_url.
        lv_url2 = lv_url.
        call method lo_window_manager->create_external_window
          exporting
            url            = lv_url2
            modal          = abap_false
            has_menubar    = abap_true
            is_resizable   = abap_true
            has_scrollbars = abap_true
            has_statusbar  = abap_true
            has_toolbar    = abap_true
            has_location   = abap_true
          receiving
            window         = lo_window.
        lo_window->open( ).
    Regards
    Bruce

  • Default settings for opening documents

    When I download a document e.g. from mail, it is set to automatically open as an 'open office' document.  I don't want this - how do I change the default setting? 
    Thanks

    Sorry, but I am late to this game. Same problem. When I double click a photo file (tif, jpg, nef, etc) Photoshop CS6 is launched, even if I am in Bridge CC. If I go to the "Get Info" and change the "open with" to Photoshop CC and select "Change All" it simply goes back to the Photoshop CS6 default. What am I misssing?
    Thanks in advance
    David
    iMac OSX 10.8.5

  • Panel for open documents

    i like to have a panel for viewing and selecting open documents

    i think that's a simple thing to do using scripting

Maybe you are looking for

  • Do I need to change the localhost test if on a network?

    I have a JSP program running on tomcat webserver at home. This program works. At home the computer accesses the internet via a dialup modem. I am trying to run this program at another location. I have taken my hard disk and installed the hard disk at

  • Wb_rt_api_exec in pl/sql as OWB target

    I've got a question similar to the one posted by Donna Kelley on 26-mar-2007 ( Re: 10gR2: How do you run OWB from Enterprise Manager (OEM) and Scheduler? I'm unable to figure out the grants needed to execute wb_rt_api_exec.run_task within a pl/sql pr

  • Nternal workflow error. An internal workflow error occurred.

    Hi all I am getting this exception after approving request by approver which is actually failing to approve the task ORABPEL-30023 Internal workflow error. An internal workflow error occurred. Refer to the log file that is configured for oracle.soa.s

  • Upgrading operating system and syncing music

    All Im not doing this just yet, but wondered on other peoples experiences and to ensure that this will not be an issue... I currently run OSX Tiger, but will upgrade to Leopard once I'm confident its had enough time to ensure any possible issues are

  • Export to DV needed to keep sound for AVI files burned with iDVD

    I have recently found out that in order to have sound throughout the DVDs that I burn, I must first convert AVI files to DV. This however distorts wide screen video files, thus I am wondering one of two things; the first being if I can convert the fi