Loading ...
Sorry, an error occurred while loading the content.

Doc Count Function

Expand Messages
  • Art Kocsis
    Is there a function to return the number of open documents in an instance of Notetab (i.e., the max valid value of ^!SetDocIndex)? If not, there should be. If
    Message 1 of 5 , May 2, 2012
    View Source
    • 0 Attachment
      Is there a function to return the number of open documents in an instance
      of Notetab (i.e., the max valid value of ^!SetDocIndex)?

      If not, there should be.

      If not, would this be a reliable workaround?

      ^!Set %curIndx%=^$GetDocIndex$ [Capture current doc index]
      ^!Document LAST [Switch to last doc]
      ^!Set %maxIndx%=^$GetDocIndex$ [Save index of last doc]
      ^!SetDocIndex=^%curIndx% [Switch back to original doc]


      Namaste', Art
    • Axel Berger
      ... Ought to work. I have not yet used DocIndex and I wouldn t want to. From the check I just did, whenever I close one document, all the others get renumbered
      Message 2 of 5 , May 2, 2012
      View Source
      • 0 Attachment
        Art Kocsis wrote:
        > If not, would this be a reliable workaround?

        Ought to work. I have not yet used DocIndex and I wouldn't want to. From
        the check I just did, whenever I close one document, all the others get
        renumbered so the current index in the current view is not a reliable
        label to use IMHO.

        Axel
      • Dan Gagne
        ^$GetDocCount$ ________________________________ From: Art Kocsis To: NoteTab-Clips Sent: Wed, May 2, 2012
        Message 3 of 5 , May 2, 2012
        View Source
        • 0 Attachment
          ^$GetDocCount$



          ________________________________
          From: Art Kocsis <artkns@...>
          To: NoteTab-Clips <ntb-clips@yahoogroups.com>
          Sent: Wed, May 2, 2012 2:03:46 AM
          Subject: [Clip] Doc Count Function


          Is there a function to return the number of open documents in an instance
          of Notetab (i.e., the max valid value of ^!SetDocIndex)?

          If not, there should be.

          If not, would this be a reliable workaround?

          ^!Set %curIndx%=^$GetDocIndex$ [Capture current doc index]
          ^!Document LAST [Switch to last doc]
          ^!Set %maxIndx%=^$GetDocIndex$ [Save index of last doc]
          ^!SetDocIndex=^%curIndx% [Switch back to original doc]

          Namaste', Art




          [Non-text portions of this message have been removed]
        • Art Kocsis
          ... Duh!!! Looked right past it. Thanks Art
          Message 4 of 5 , May 2, 2012
          View Source
          • 0 Attachment
            At 5/2/2012 06:21 AM, Dan Gagne wrote:
            >^$GetDocCount$
            >
            >Is there a function to return the number of open documents in an instance
            >of Notetab (i.e., the max valid value of ^!SetDocIndex)?

            Duh!!! Looked right past it.

            Thanks

            Art
          • Art Kocsis
            ... I don t use DocIndex as a label for a unique doc except to return focus after temporarily switching focus to a different one. DocIndex is obviously not
            Message 5 of 5 , May 2, 2012
            View Source
            • 0 Attachment
              At 5/2/2012 02:24 AM, Axel wrote:
              >Art Kocsis wrote:
              > > If not, would this be a reliable workaround?
              >
              >Ought to work. I have not yet used DocIndex and I wouldn't want to. From
              >the check I just did, whenever I close one document, all the others get
              >renumbered so the current index in the current view is not a reliable
              >label to use IMHO.

              I don't use DocIndex as a label for a unique doc except to return focus after
              temporarily switching focus to a different one.

              DocIndex is obviously not reliable if opening or closing docs but very useful
              for looping through all open docs or returning to the original after opening
              and operating on a new one. It would be a lot more work to build and use
              a list of doc names.
            Your message has been successfully submitted and would be delivered to recipients shortly.