Tuesday, 23 December 2008

Opening your current working directory

I love simple ideas that can save time and hassle here and there. Here's one of them. I got fed up of navigating to my current working directory so built a shortcut to open it using the following:

Dim activeDoc As Document = revitApp.ActiveDocument

If activeDoc.PathName <> "" Then
Process.Start("explorer.exe", Replace(activeDoc.PathName, activeDoc.Title, ""))
End If
Just drop this into a class implementing IExternalCommand, call your dll from a menu item or button of your making, and hey presto life is soooo much better. One click and you're there.



1 comment:

  1. What a great idea! There must be loads of little opportunities like this to make our lives easier.

    I feel a list coming on, I'll ask around :)

    ReplyDelete

Comments are moderated, so you'll have to wait a little bit before they appear!