| | |
| | | File.WriteAllText(GlobalResource.RecordFilePath, config);
|
| | | }
|
| | |
|
| | | public static bool UploadFile(Document _doc,string desc, out string err)
|
| | | public static bool UploadFile(Document _doc, string desc, out string err)
|
| | | {
|
| | | err = "";
|
| | | var tempDir = Path.Combine(Path.GetDirectoryName(GlobalResource.BinDirectory), "temp"); //"d:\\temp";
|
| | |
| | | var modelFile = tempDir + "\\model.rvt";
|
| | | var settingFile = tempDir + "\\setting.json";
|
| | | var otherFile = tempDir + "\\struct_others.json";
|
| | | var userFile = GlobalResource.LoginUserFilePath;
|
| | |
|
| | | try
|
| | | {
|
| | |
| | | var setting = new SettingsViewModel() { Version = "1" };
|
| | | File.WriteAllText(settingFile, JsonHelper.ToJson(setting));
|
| | |
|
| | | var files = new string[] { structFile, modelFile, settingFile, otherFile };
|
| | | var files = new string[] { structFile, modelFile, settingFile, otherFile, userFile };
|
| | | ZipFiles(files, zipFilePath);
|
| | |
|
| | | File.Delete(structFile);
|
| | |
| | | if (document == null) { return; }
|
| | |
|
| | | //var ids = GlobalResource.RevitModels.GetOtherIds()?.Select(x => new ElementId(int.Parse(x))).ToList();
|
| | | var notContains = new List<string>() { "图例构件", "楼板", "墙","栏杆扶手","楼梯" };
|
| | | var notContains = new List<string>() { "图例构件", "楼板", "墙", "栏杆扶手", "楼梯" };
|
| | | var nameContains = new List<string>() { "混凝土底座" };
|
| | | var c3 = new Autodesk.Revit.DB.FilteredElementCollector(document).WhereElementIsNotElementType();//.WhereElementIsElementType();
|
| | | var c4 = new Autodesk.Revit.DB.FilteredElementCollector(document).WhereElementIsElementType();
|