Dictionary<string, string> GetFilePaths(
Application app,
bool onlyImportedFiles)
{
DocumentSet docs = app.Documents;
int n = docs.Size;
Dictionary<string, string> dict
= new Dictionary<string, string>( n );
foreach( Document doc in docs )
{
if( !onlyImportedFiles
|| ( null == doc.ActiveView ) )
{
string path = doc.PathName;
int i = path.LastIndexOf( "\\" ) + 1;
string name = path.Substring( i );
dict.Add( name, path );
}
}
return dict;
}