public BE(string path) { WorkspaceConnectionInfo wscon = new WorkspaceConnectionInfo(); wscon.Type = WorkspaceType.SMWU; wscon.Server = path; root = path.Substring(0, path.LastIndexOf('\\')); ws.Open(wscon); TypeModelProcess tmp = new TypeModelProcess(); foreach (Datasource datasource in ws.Datasources) { foreach (Dataset dataset in datasource.Datasets) { switch (dataset.Type) { case DatasetType.CAD: //case DatasetType.Model: if (tmp.OutPath == root + @"\BoundingBox\" + dataset.Name + "@" + datasource.Description + ".txt") { break; } else { tmp.Dataset = dataset as DatasetVector; tmp.OutPath = root + @"\BoundingBox\" + dataset.Name + "@" + datasource.Description + ".txt"; new Thread(tmp.run).Start(); Thread.Sleep(100); } //addBox(tmp.Dataset, tmp.OutPath); break; default: break; } } } }