Community
Hi,
System.Io does not find file.
Program was written in 2010 vb.net trying toconvert to C# 2012 Revit API 2015.
Have searched for 2 days with no luck. Any help would be appreciated.
Bob V
void WideFlange(Element elem) { System.IO.StreamReader objWordReader = null; string wordlevel = null; string Delimiter = null; int count = 0; string parentName = null; string ParentPath = "C:\\ProgramData\\Autodesk\\RVT 2015\\Libraries\\US Imperial\\Structural Framing\Steel\\W-Wide Flange.text"; parentName = elem.Name; if (System.IO.File.Exists(ParentPath) == true) {
try "C:\\ProgramData\\Autodesk\\RVT 2015\\Libraries\\US Imperial\\Structural Framing\\Steel\\W-Wide Flange.text"
you neglected to escape the "\" between Structural Framing and Steel.
personally I'd change it to @"C:\ProgramData\Autodesk\RVT 2015\Libraries\US Imperial\Structural Framing\Steel\W-Wide Flange.text" for easier visual checking.