Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File search error

1 REPLY 1
Reply
Message 1 of 2
rvetrano
250 Views, 1 Reply

File search error

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) {

 

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: rvetrano

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.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community