Can you provide more information on the filesNames variable?
Just that you have fileNames.Count and then fileNames.ToString()
Assuming this is an array or collection since is has a count property do you need to use filesNames(i).ToString(); in the loop?
Yes fileNames is an ArrayList where I stored all my (String) fileNames.
I used the index of my arrayList mentioned [ i ], it's just not good copied...
String fileName = fileNames[ i ].ToString(); (this forum takes [ i ] as italic?)
Just be curious.
This is C# code, right?
In Lisp, one you use "/" for ""\" (or use "\\"). But in C#, it is not the case. Either use "\\" for "\" or use "@" precedes a "literal text string containing "\".
Are you sure BricsCAD exposes API that allows to use "\" in C# in a file path (since you said the first save is succeeded and only errors out on next drawing)?
Can you use Debug.Print/MessageBox to show variable p before SaveAs() is called to verify you do have a valid path?
The first two drawings can be saved, and are saved in the specific folder I chose. But from the third drawing I get this error on the db.saveAs(p) function:
Error HRESULT E_FAIL has been returned from a call to COM component:
BricscadApp.IAcadDocument.SaveAs(String FullFileName, Object SaveAsType, Object vSecurityParams)
Also, perhaps you use it later, but in the code shown, curDoc is declared but not used.
curDoc is not used, I removed it but still same problem