• Announcements

    • Shane D.

      Evernote Webinars   12/01/2017

      We've recently begun conducting Evernote Webinars for various topics and subjects. Take a look at the Calendar to check them out, and see if they interest you! Keep an eye out as there will be more to come in the future!
    • Shane D.

      Evernote 2018 Planning Templates   12/11/2017

      The Evernote 2018 Planning Templates are now available! You can find them Here!  
  • 0
Juriaan

Listing tags on a given note in vb.net

Idea

Imports System
Imports EvernoteSDK
Imports System.IO
Imports System.Collections.Generic
Imports EvernoteSDK.Advanced

Public class main
dim myResultsList As List(Of ENSessionFindNotesResult)
    ENSession.SetSharedSessionConsumerKey("KEY", "SECRET")

        If ENSession.SharedSession.IsAuthenticated = False Then
            ENSession.SharedSession.AuthenticateToEvernote()




myResultsList = ENSession.SharedSession.FindNotes(ENNoteSearch.NoteSearch("text to find"), Nothing, ENSession.SearchScope.All, ENSession.SortOrder.RecentlyUpdated, 500)

                  ' Given a NoteRef instance, download that note.
            Dim myDownloadedNote As ENNote = ENSession.SharedSession.DownloadNote(myResultsList(0).NoteRef)

            For i As Integer = 0 To myDownloadedNote.TagNames.Count - 1
                Note_tags_txt.Text = Note_tags_txt.Text + " " + myDownloadedNote.TagNames.Item(i)
            Next
end class 


On Stackoverflow I was informed to use "GetNoteTagNames" instead, but without proper example in vb.net that comment sounded a bit cryptic, since I cannot find that command.

I seem to be able to do all other operations on the notes just fine, such as getting the resources, the title, the content, the notebook name, and even searching note. It is just the tag name I cannot seem to be able to retrieve...

Could someone post a vb.net example on how to get the tags of a note given the note GUID? 

Share this post


Link to post

3 replies to this idea

Recommended Posts

  • 0

Hi.  You're posting in a (mainly) user-supported forum here.  That query was probably best placed on Stackoverflow - don't know if anyone here can suggest alternatives...

 

Share this post


Link to post
  • 0
On 11/29/2017 at 9:22 AM, Juriaan said:

Could someone post a vb.net example on how to get the tags of a note given the note GUID?

Thanks for posting this here, in this forum.  In spite of what the above poster stated, there are a number of forum members here who have an extensive technical background, and might be able to help.  IAC, if you are able to arrive at a solution that works, there may be some members here who would like to use your code.

Of course, it is also wise to post in the Stackoverflow forum as well.

Please keep us informed if you are able to make any progress.

Share this post


Link to post
  • 0
On 11/29/2017 at 10:22 AM, Juriaan said:

On Stackoverflow I was informed to use "GetNoteTagNames" instead, but without proper example in vb.net that comment sounded a bit cryptic, since I cannot find that command. I seem to be able to do all other operations on the notes just fine, such as getting the resources, the title, the content, the notebook name, and even searching note. It is just the tag name I cannot seem to be able to retrieve... Could someone post a vb.net example on how to get the tags of a note given the note GUID?

OK, so first thing, it looks like you're using the Windows SDK, but the StackOverflow person is recommending API functionality. And it accessing the tag list seems reasonable, though I'm not a VB dev. So what exactly is failing for you? Are you getting any tag names at all? An error?

How about trying something like:

For Each tag As myDownloadedNote.TagNames
     Note_tags_txt.Text = Note_tags_txt.Text + " " + tag
Next

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now