Opening File Dialog In Revit / Dynamo

Hey Guys,

I am currently trying to create a custom Python script to open folder paths based on my “IN” category. I currently have the following code but am unsure why it is not working. Any ideas?

Thank you,
Kevin

import sys
path = r’C:\Program Files (x86)\IronPython 2.7\Lib’
sys.path.append(path)

import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference(‘RevitNodes’)
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference(“RevitServices”)
import RevitServices

dataEnteringNode = IN
input = IN[0]

import subprocess
subprocess.Popen(r’explorer /select’, IN[0])

OUT = 0

Hi @kbruno1989

Try this:

import sys
path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(path)

import subprocess

subprocess.Popen(['explorer', IN[0]])

Hello Kulkul,

That worked perfectly! Thank you so much. I really appreciate it :slight_smile:

  • Kevin