public void ExportAsFile(string filetype) { string filename = System.DateTime.Now.ToString("yyyyMMddHHmmss"); string path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments); if (!Directory.Exists(Path.Combine(path, "CalcflowExports"))) { Directory.CreateDirectory(Path.Combine(path, "CalcflowExports")); } FileExporter.SaveMesh(meshVisuals, Path.Combine(Path.Combine(path, "CalcflowExports"), filename), filetype); }