elmundo777
Automotive
Hello. I'm want to write a macro (catscript\vb\c#) to save ONLY active document.
But I don't know how to do this.
In this C# code I can save all opened documents
How I can save only active document or last created document?
But I don't know how to do this.
In this C# code I can save all opened documents
How I can save only active document or last created document?
Code:
var path = tb_path.Text;
for (int iDoc = 1; iDoc <= CATIA.Documents.Count; iDoc++)
{
Document docc = null;
docc = CATIA.Documents.Item(iDoc);
string nn = CATIA.Documents.Item(iDoc).get_Name();
string TOTAL = path + @"\" + nn;
docc.SaveAs(TOTAL);
}