Tablet PC – A Student's Perspective

One Note, Note Taking and Powertoys

TreeView

Posted by anirudhsaraf on February 8, 2009

This blog has been quiet for a while now as I have been ( am) extremely busy at College. I did however get a chance to make some changes to TreeView. I have been using it for a while now without any trouble so I thought I’ll post it up ( link at bottom).

TreeView

TreeView

As the above Screenshot shows, it has undergone a few enhancements.

Some Added Features

Favorite Folders : You can now create as many favorite folders as you wish. Use it to create alternate views of your notes.

Make Root ( The up arrow button):ย  Allows you to select any node and make it the topmost element in the TreeView. Specially useful if you are working within a single notebook and section and want to get rid of all the other noise.

Find Page in Tree : Are you on a particular page in OneNote and wish to locate it in the TreeView. This funky two page button will do just that.

Refresh : Refreshes the content of the TreeView to reflect the current hierarchy of OneNote.

Note : This is a standalone executable. There is no installation and it does not run from OneNote. Consequently, it does not make any changes to your system.

Feedback will be appreciated !

Update: Rev 1- Fixed Bug with TreeView Crashing if pages contained tags. If you had problems when TreeView crashed on startup, try the new copy. Thanks John for bringing it to notice !

Download TreeView

Advertisements

31 Responses to “TreeView”

  1. […] TreeView […]

  2. chandra said

    sorry there is some error with your exe. I am unable to run it

    chandra

  3. John Richardson said

    I too cannot run the executable. A dialog box simply opens saying “TreeView has stopped working”.

    I am running Windows Vista Ultimate 64bit, with the .NET framework 3.5 (with service pack).

    Best wishes,

    John

    • anirudhsaraf said

      This sometimes happen if you are already have OneNote running , and you run TreeView as an admin. Run OneNote and TreeView with the same privilege level. Let me know if that helps.

      Thanks,
      Ani

  4. John Richardson said

    Thanks for the tip. This wasn’t the problem.

    By closing notebooks, I got Treeview working, and by re-opening notebooks and moving sections and pages, I isolated the crash to an individual page. Even with all content removed from the page, it causes the crash, which if reproduced when TreeView is already running, gives the error message:

    “Unhandled exception has occurred in your application….”

    “Cannot find column [ID]”

    If you e-mail me, I can send you the (small) file containing the section and page which causes the problem.

    Unfortunately, the problem also occurs in a couple of other big notebooks, and there is no way of isolating the pages except by trial and error. However, having got Treeview working, it is exactly what I need to help me navigate (and organise with favourites), my notebooks.

    So many thanks, and good luck tracking down the bug!

    Best wishes,

    John

    Full error message:

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.
    ************** Exception Text **************
    System.Data.EvaluateException: Cannot find column [ID].
    at System.Data.NameNode.Bind(DataTable table, List`1 list)
    at System.Data.BinaryNode.Bind(DataTable table, List`1 list)
    at System.Data.DataExpression.Bind(DataTable table)
    at System.Data.Select..ctor(DataTable table, String filterExpression, String sort, DataViewRowState recordStates)
    at System.Data.DataTable.Select(String filterExpression)
    at TreeView4.DataManager.GetNodeType(String ID)
    at TreeView4.DataManager.GetNodeChildren(String ID)
    at TreeView4.DataManager.GetNodeChildren(RootNodes specialID)
    at TreeView4.DisplayTreeView.LoadTree(Presenter setPresenter)
    at TreeView4.Presenter.RefreshViewButtonClicked()
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    —————————————-
    TreeView
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/John/Desktop/TreeView.exe
    —————————————-
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-
    System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
    —————————————-
    Microsoft.Office.Interop.OneNote
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.4518.1014
    CodeBase: file:///C:/Windows/assembly/GAC/Microsoft.Office.Interop.OneNote/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.OneNote.dll
    —————————————-
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    —————————————-
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    —————————————-
    System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
    —————————————-
    Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    —————————————-

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  5. John Richardson said

    Hi Ani,

    Mailed you this last week. Any thoughts?

    Best wishes,

    John

    • anirudhsaraf said

      Thanks for the Email. That error should now be fixed. Try the new upload and let me know.

      Thanks for the feedback !

      Ani

  6. John Richardson said

    Yeah – that’s working now!

    Great work Ani. Many thanks.

    John

  7. Luke Banard said

    I get this error message when I run the application:


    EvenType: cIr2Or3 P1: treeview.exe P2: 1.0.0.0 P3: 49a3710c
    P4: treeview P5:1.0.0.0 P6: 49a3710c P7: 7a P8: 1c6
    PS: system.io.filenotfoundexception

    thanks

    Luke.

    • anirudhsaraf said

      Hi Luke, what OS are you running? Does the application not stat up? Can you provide any othe details?

      Thanks,
      Ani

  8. Luke Banard said

    I’m running on Windows Xp 2002 service pack 3 home edition.

    It says “TreeView has encounterd a problem and needs to close” when I try to run it. The application does not start up.

  9. Yg said

    same problem as Luke here …

  10. bc said

    Same problem as Yg and Luke. Windows XP service pack 3 home also.
    Pity, what I most dislike about OneNote is the lack of a simple, quick tree view.

  11. Ian said

    Same problem in Windows XP, the program will not launch: “TreeView has encountered a problem and needs to close. We are sorry for the inconvenience.”

    Does anyone know if the TreeView executable will work if I upgrade to Windows 7?

    I find a tree view so useful that I don’t currently use OneNote as much as I’d like- instead I use Treepad or KeyNote.

  12. StewS said

    At the risk of sounding stupid, is there some documentation for this explaining the basic purpose and suggested usage?

    I’ve played with it a bit and I have some ideas, but I’m guessing the author is thinking of more than I’ve found so far.

    For example, it took some playing to figure out the purpose of the drop-down list at the top, which initially only says “All”. I had to click “Make Current Node the Root” to see that this would drill down into my notebook tree, then the drop-down would let me navigate back up. I’m still clueless as to why I can (or would want to) drag that frame by grabbing the handle on the left.

    Leave it to a long-time professional programmer to ask for documentation! ๐Ÿ™‚

    Nice job on this, BTW!

    • anirudhsaraf said

      Hi Stew,

      Thanks for the comment ! Unfortunately there is no documentation – this is more of a side project which unfortunately is in a bit of an abandoned state right now.

      Yes – the main reason for the drop down is to quickly navigate to a notebook. I don’t like all the noise of the other notebooks sometimes and thats when the “Make Current Node” and the top drop down comes into play. The favorites stuff should largely be self explanatory. I will be happy to explain if something else doesn’t make sense.

      As for dragging the handle – its a poor design decision. it was put in just because I could ( blame it on my inexperience).

      I’ll be interested to hear your ideas – I might enhance it once OneNote 2010 ships !

      Thanks for the feedback !

      Ani

      • Stew said

        Ani,

        I’m amazed you found time in your student schedule to reply so quickly. Dodging studying for a test? ๐Ÿ˜‰

        Thanks for the clues beyond what I’d sussed out. Even though I love playing with new software first, I believe in RTFM, at least for backup!

        My one wish for the Favorites would be that I could rename it, as my page titles aren’t specific enough w/in a notebook to be quickly identifiable if I have more than a couple. So I’d like to rename “Project Proposal” to “ABC Proposal”.

        Another thought would be simply icons in the tree, distinguishing notebooks, section groups, sections and pages. That would give us a clearer idea of where we are. Yeah, we should be able to figure it out from how low each is in the hierarchy, but graphics are good. If the C# tree object doesn’t make adding icons easy, maybe color-coding the text background for each item? Something subtle and not too distracting?

        In my mind, making software functional is the easy part. It’s presenting it to the user so it’s intuitive and most productive that’s the real challenge.

        Best of luck,

        Stew

      • anirudhsaraf said

        Thanks Stew ! I have actually started working full time and no longer in college – and thus the lack of time to really work on this much.

        Both you ideas are good and I might work on them once 2010 is released. 2010 has a sort of tree view navigation in the search bar though – so I am not too sure if this project will get much love anymore. But thanks for the ideas !

        Ani

  13. Mike+Kel said

    Very cool. Thanks heaps for the effort you’ve put into this.

    I am running x64 Vista and it appears to all work fine. Although i watched a video which had the tree integrated in the OneNote GUI – my tree is an independant window.

    • anirudhsaraf said

      Thanks Mike !

      Yes the earlier version sort of integrated into OneNote but a lot of people had problems installing/uninstalling the program so I figured doing an independent release was much easier.

  14. Jan Roelof said

    Thank you for a very useful OneNote utility – also for 2010!

    Is there any chance you would share the source code?

    Thanks and cheers!
    Jan Roelof

    • anirudhsaraf said

      Thanks Jan.

      Yes. I have stopped actively developing the tool – so will try and open source it and put it up on codeplex.

      Ani

  15. Lewis Levin said

    Dream comes true. Makes OneNote useful again for complex “books”. Was searching the world for many outliners. All have limitations: huge dbs, poor rtf editors, etc. OneNote is well-crafted but with strange UI metaphor. Now, I can see my hierarchy. Maybe we’ll get “hierarchy view” in Office 2010. Sort of hinted at in Rasmussen’s blog but the tech preview has no such view.

    Again, many thanks for this great tool…

    • anirudhsaraf said

      Thanks ๐Ÿ™‚

      OneNote 2010 has a sort of hierarchy view in the search toolbar. It’s limited and you can’t have it visible permanently but it does a pretty good job for a quick peak at the hierarchy. Just wish it could be undocked for permanent visibility.

  16. brat111111 said

    interesting you have a blog.

  17. allan said

    hi

    hum… how do u open it? I have this independent window, but there is just the 3 usual windows icons (close, …). Then how do you launch the tree? Help!
    Otherwise good job! Very useful, Microsoft should definitely integrate this kind of thing in the next versioh

    Thanks

    Al

  18. Shasta247 said

    I knew my notebook contributors and myself needed a better way to navagate OneNote so I Google’d “OneNote Tree View” and found this tool. To sum up this tool in a single word – Awesome! I would love the source code if you could send it to me or let me know if you post it on CodePlex. THANK YOU!!!

  19. Phill said

    Great Utility and extremely useful.
    Many thanks.

    Having one small issue with the source code. when opening some onenote sections, I get the โ€œCannot find column [ID]โ€ error. (I think you already fixed this issue). If I use the exe from your upload, it works fine.

    The error is coming from the GetNodeType method in the DataManager.cs file.

    Only reason I was poking around in there was to make the form always on top using ‘this.TopMost = true;’

    Thanks again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: