diff --git a/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml.cs b/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml.cs index 1571f64..7d5d6b8 100644 --- a/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml.cs +++ b/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml.cs @@ -124,8 +124,11 @@ namespace RookieStation.CommonTools.Views private void btnSelectPath_Click(object sender, RoutedEventArgs e) { - FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); - if (folderBrowserDialog.ShowDialog() == DialogResult.OK) + VistaFolderBrowserDialog folderBrowserDialog = new VistaFolderBrowserDialog() + { + Multiselect = false, + }; + if (folderBrowserDialog.ShowDialog()) { FamilyFolder = folderBrowserDialog.SelectedPath; btnSelectPath.ToolTip = FamilyFolder; @@ -137,7 +140,7 @@ namespace RookieStation.CommonTools.Views private void btnSearch_Click(object sender, RoutedEventArgs e) { - if (tbSearch.Text == "") + if (tbSearch.Text == "" || lbFamilyLib.ItemsSource == null) { return; } diff --git a/RookieStation/Drawing/ExecuteCmds/CmdCreateCentralizeAnnotation.cs b/RookieStation/Drawing/ExecuteCmds/CmdCreateCentralizeAnnotation.cs new file mode 100644 index 0000000..714174f --- /dev/null +++ b/RookieStation/Drawing/ExecuteCmds/CmdCreateCentralizeAnnotation.cs @@ -0,0 +1,63 @@ +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Selection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RookieStation.Drawing.ExecuteCmds +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + internal class CmdCreateCentralizeAnnotation : IExternalCommand + { + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + UIApplication uiapp = commandData.Application; + UIDocument uidoc = uiapp.ActiveUIDocument; + Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; + Document doc = uidoc.Document; + DocumentSet docset = uiapp.Application.Documents; + using (Transaction trans = new Transaction(doc, "cmd")) + { + try + { + SelectionFilter selfilter = new SelectionFilter(); + var refers = uidoc.Selection.PickObjects(ObjectType.Element, "请选择元素"); + + trans.Start(); + //Do Something. + trans.Commit(); + } + catch (Autodesk.Revit.Exceptions.OperationCanceledException ex) + { + if (trans.GetStatus() == TransactionStatus.Started) + { + trans.RollBack(); + } + return Result.Cancelled; + } + } + return Result.Succeeded; + } + + public class SelectionFilter : ISelectionFilter + { + public bool AllowElement(Element element) + { + if (element.Category.Name == "XXX") + { + return true; + } + return false; + } + + public bool AllowReference(Reference refer, XYZ point) + { + return false; + } + } + } +} \ No newline at end of file diff --git a/RookieStation/Drawing/ExecuteCmds/CmdCreateLightLegend.cs b/RookieStation/Drawing/ExecuteCmds/CmdCreateLightLegend.cs index 70aa1ce..fbfdd0d 100644 --- a/RookieStation/Drawing/ExecuteCmds/CmdCreateLightLegend.cs +++ b/RookieStation/Drawing/ExecuteCmds/CmdCreateLightLegend.cs @@ -81,7 +81,7 @@ namespace RookieStation.Drawing.ExecuteCmds foreach (var g2 in lightSymbolGroup) { var instance = g2.ElementAt(0); - var wattage = instance.Symbol.get_Parameter(BuiltInParameter.FBX_LIGHT_WATTAGE).AsValueString(); + //var wattage = instance.Symbol.get_Parameter(BuiltInParameter.FBX_LIGHT_WATTAGE).AsValueString(); var mark = instance.Symbol.get_Parameter(BuiltInParameter.WINDOW_TYPE_ID).AsString(); var annotation = instance.Symbol.get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_COMMENTS).AsString(); var comment = annotation == null ? $"{instance.Symbol.FamilyName}" : $"{instance.Symbol.FamilyName},{annotation}"; diff --git a/RookieStation/Drawing/ExecuteCmds/CmdCreateMainMaterialsTable.cs b/RookieStation/Drawing/ExecuteCmds/CmdCreateMainMaterialsTable.cs index e252435..09e3051 100644 --- a/RookieStation/Drawing/ExecuteCmds/CmdCreateMainMaterialsTable.cs +++ b/RookieStation/Drawing/ExecuteCmds/CmdCreateMainMaterialsTable.cs @@ -24,178 +24,188 @@ namespace RookieStation.Drawing.ExecuteCmds View activeview = doc.ActiveView; if (uidoc.ActiveView.ViewType == ViewType.DrawingSheet) { - CurveArray curveArray = new CurveArray(); - var tableLocation = uidoc.Selection.PickPoint(ObjectSnapTypes.Endpoints, "请选择布图区域左上角端点"); - - var sql = SQLiteUtil.GetInstance(); - sql.CreateDb(UserConstant.DbFolder + "Inventory.db"); - List tableRow = sql.QueryTable("MainMaterials"); - sql.CloseConncetion(); - //FilteredElementCollector collectorAll = new FilteredElementCollector(doc); - //collectorAll.WherePasses(new LogicalOrFilter(new ElementIsElementTypeFilter(false), new ElementIsElementTypeFilter(true))); - var collectorAll = new FilteredElementCollector(doc); - ElementClassFilter instanceFilter = new ElementClassFilter(typeof(FamilyInstance)); - ElementClassFilter hostobjectFilter = new ElementClassFilter(typeof(HostObject)); - LogicalOrFilter orFilter = new LogicalOrFilter(instanceFilter, hostobjectFilter); - collectorAll.WherePasses(orFilter); - List materialItems = new List(); - double similarity = 0.4;//相似度 - for (int i = 0; i < tableRow.Count; i++) + try { - var description = tableRow[i][1]; - var position = tableRow[i][6]; - bool isExist = false; - foreach (var ele in collectorAll) - { - string name = string.Empty; - FamilyInstance fi = ele as FamilyInstance; - if (fi != null) - { - name = fi.Symbol.FamilyName; - } - else - { - name = ele.Name; - } - if (CommonUtils.levenshtein(description, name) > similarity || CommonUtils.levenshtein(position, name) > similarity) - { - isExist = true; - break; - } - } - if (isExist) - { - MaterialItem item = new MaterialItem() - { - Description = tableRow[i][1], - FireRating = tableRow[i][2], - Legend = $"{UserConstant.MainMaterialFolder}{tableRow[i][1]}.png", - Specifications = tableRow[i][4], - Pigment = tableRow[i][5], - Position = tableRow[i][6], - Remark = tableRow[i][7], - }; - materialItems.Add(item); - } - } - var width = 346 / 304.8; - var height = 283 / 304.8; - var gridWidth = width / 7; - var gridHeight = height / (materialItems.Count + 1);//表头要加1 - doc.InvokeGroup(tg => - { - doc.Invoke(ts => - { - for (int j = 0; j < 8; j++) - { - var colStart = new XYZ(tableLocation.X + j * gridWidth, tableLocation.Y, 0); - var colEnd = new XYZ(tableLocation.X + j * gridWidth, tableLocation.Y - height, 0); - Line colLine = Line.CreateBound(colStart, colEnd); - curveArray.Append(colLine); - } - TextNoteType textNoteType = new FilteredElementCollector(doc).OfClass(typeof(TextNoteType)).Where(x => x.Name.Contains("宋")).FirstOrDefault() as TextNoteType; - var opts = new TextNoteOptions(textNoteType.Id) - { - HorizontalAlignment = HorizontalTextAlignment.Center, - VerticalAlignment = VerticalTextAlignment.Middle - }; - for (int i = 0; i <= materialItems.Count; i++) - { - var rowStart = new XYZ(tableLocation.X, tableLocation.Y - i * gridHeight, 0); - var rowEnd = new XYZ(tableLocation.X + width, tableLocation.Y - i * gridHeight, 0); - Line rowLine = Line.CreateBound(rowStart, rowEnd); - curveArray.Append(rowLine); + CurveArray curveArray = new CurveArray(); + var tableLocation = uidoc.Selection.PickPoint(ObjectSnapTypes.Endpoints, "请选择布图区域左上角端点"); - if (i == 0)//创建表头 + var sql = SQLiteUtil.GetInstance(); + sql.CreateDb(UserConstant.DbFolder + "Inventory.db"); + List tableRow = sql.QueryTable("MainMaterials"); + sql.CloseConncetion(); + //FilteredElementCollector collectorAll = new FilteredElementCollector(doc); + //collectorAll.WherePasses(new LogicalOrFilter(new ElementIsElementTypeFilter(false), new ElementIsElementTypeFilter(true))); + var collectorAll = new FilteredElementCollector(doc); + ElementClassFilter instanceFilter = new ElementClassFilter(typeof(FamilyInstance)); + ElementClassFilter hostobjectFilter = new ElementClassFilter(typeof(HostObject)); + LogicalOrFilter orFilter = new LogicalOrFilter(instanceFilter, hostobjectFilter); + collectorAll.WherePasses(orFilter); + List materialItems = new List(); + double similarity = 0.4;//相似度 + for (int i = 0; i < tableRow.Count; i++) + { + var description = tableRow[i][1]; + var position = tableRow[i][6]; + bool isExist = false; + foreach (var ele in collectorAll) + { + string name = string.Empty; + FamilyInstance fi = ele as FamilyInstance; + if (fi != null) { + name = fi.Symbol.FamilyName; + } + else + { + name = ele.Name; + } + if (CommonUtils.levenshtein(description, name) > similarity || CommonUtils.levenshtein(position, name) > similarity) + { + isExist = true; + break; + } + } + if (isExist) + { + MaterialItem item = new MaterialItem() + { + Description = tableRow[i][1], + FireRating = tableRow[i][2], + Legend = $"{UserConstant.MainMaterialFolder}{tableRow[i][1]}.png", + Specifications = tableRow[i][4], + Pigment = tableRow[i][5], + Position = tableRow[i][6], + Remark = tableRow[i][7], + }; + materialItems.Add(item); + } + } + var width = 346 / 304.8; + var height = 283 / 304.8; + var gridWidth = width / 7; + var gridHeight = height / (materialItems.Count + 1);//表头要加1 + doc.InvokeGroup(tg => + { + doc.Invoke(ts => + { + for (int j = 0; j < 8; j++) + { + var colStart = new XYZ(tableLocation.X + j * gridWidth, tableLocation.Y, 0); + var colEnd = new XYZ(tableLocation.X + j * gridWidth, tableLocation.Y - height, 0); + Line colLine = Line.CreateBound(colStart, colEnd); + curveArray.Append(colLine); + } + TextNoteType textNoteType = new FilteredElementCollector(doc).OfClass(typeof(TextNoteType)).Where(x => x.Name.Contains("宋")).FirstOrDefault() as TextNoteType; + var opts = new TextNoteOptions(textNoteType.Id) + { + HorizontalAlignment = HorizontalTextAlignment.Center, + VerticalAlignment = VerticalTextAlignment.Middle + }; + for (int i = 0; i <= materialItems.Count; i++) + { + var rowStart = new XYZ(tableLocation.X, tableLocation.Y - i * gridHeight, 0); + var rowEnd = new XYZ(tableLocation.X + width, tableLocation.Y - i * gridHeight, 0); + Line rowLine = Line.CreateBound(rowStart, rowEnd); + curveArray.Append(rowLine); + + if (i == 0)//创建表头 + { + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 0.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "材料名称\nDESCRIPTION", + opts); + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 1.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "防火等级\nFIRE RATING", + opts); + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 2.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "图例\nLEGEND", + opts); + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 3.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "规格\nSPECIFICATIONS", + opts); + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 4.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "颜色\nPIGMENT", + opts); + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 5.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "位置\nPOSITION", + opts); + TextNote.Create(doc, + doc.ActiveView.Id, + new XYZ(tableLocation.X + 6.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + "备注\nREMARK", + opts); + continue; + } + + var item = materialItems[i - 1];//从0开始,i=0已运行,并跳过此段 TextNote.Create(doc, doc.ActiveView.Id, new XYZ(tableLocation.X + 0.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "材料名称\nDESCRIPTION", + item.Description, opts); TextNote.Create(doc, doc.ActiveView.Id, new XYZ(tableLocation.X + 1.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "防火等级\nFIRE RATING", - opts); - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 2.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "图例\nLEGEND", + item.FireRating, opts); + + var it = ImageType.Create(doc, new ImageTypeOptions(item.Legend)); + var ii = ImageInstance.Create(doc, + activeview, + it.Id, + new ImagePlacementOptions(new XYZ(tableLocation.X + 2.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), + BoxPlacement.Center)); + doc.Regenerate(); + ii.get_Parameter(BuiltInParameter.RASTER_SHEETHEIGHT).SetValueString("21"); + ii.get_Parameter(BuiltInParameter.RASTER_SHEETWIDTH).SetValueString("21"); + TextNote.Create(doc, doc.ActiveView.Id, new XYZ(tableLocation.X + 3.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "规格\nSPECIFICATIONS", + item.Specifications, opts); TextNote.Create(doc, doc.ActiveView.Id, new XYZ(tableLocation.X + 4.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "颜色\nPIGMENT", + item.Pigment, opts); TextNote.Create(doc, doc.ActiveView.Id, new XYZ(tableLocation.X + 5.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "位置\nPOSITION", + item.Position, opts); TextNote.Create(doc, doc.ActiveView.Id, new XYZ(tableLocation.X + 6.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - "备注\nREMARK", + item.Remark, opts); - continue; } - var item = materialItems[i - 1];//从0开始,i=0已运行,并跳过此段 - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 0.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - item.Description, - opts); - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 1.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - item.FireRating, - opts); + doc.Create.NewDetailCurveArray(activeview, curveArray); - var it = ImageType.Create(doc, new ImageTypeOptions(item.Legend)); - var ii = ImageInstance.Create(doc, - activeview, - it.Id, - new ImagePlacementOptions(new XYZ(tableLocation.X + 2.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - BoxPlacement.Center)); - doc.Regenerate(); - ii.get_Parameter(BuiltInParameter.RASTER_SHEETHEIGHT).SetValueString("21"); - ii.get_Parameter(BuiltInParameter.RASTER_SHEETWIDTH).SetValueString("21"); - - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 3.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - item.Specifications, - opts); - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 4.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - item.Pigment, - opts); - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 5.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - item.Position, - opts); - TextNote.Create(doc, - doc.ActiveView.Id, - new XYZ(tableLocation.X + 6.5 * gridWidth, tableLocation.Y - (i + 0.5) * gridHeight, 0), - item.Remark, - opts); - } - - doc.Create.NewDetailCurveArray(activeview, curveArray); - - //ii.Width = 10; - //ii.Height = 10; + //ii.Width = 10; + //ii.Height = 10; + }); }); - }); + } + catch (OperationCanceledException) + { + } + catch (Exception ex) + { + Log.WriteLog(ex.Message); + } } else { diff --git a/RookieStation/Drawing/ExecuteCmds/CmdCreateShelvesLegend.cs b/RookieStation/Drawing/ExecuteCmds/CmdCreateShelvesLegend.cs index c23d0d5..35a31f2 100644 --- a/RookieStation/Drawing/ExecuteCmds/CmdCreateShelvesLegend.cs +++ b/RookieStation/Drawing/ExecuteCmds/CmdCreateShelvesLegend.cs @@ -24,7 +24,7 @@ namespace RookieStation.Drawing.ExecuteCmds if (uidoc.ActiveView.ViewType == ViewType.DrawingSheet) { - var portRefer = uidoc.Selection.PickObject(ObjectType.Element, new SelectFilter(), "请选择参考的视口"); + var portRefer = uidoc.Selection.PickObject(ObjectType.Element, new SelectFilter(), "请选择参考的视口确定比例尺"); var viewport = doc.GetElement(portRefer) as Viewport; var viewPlan = doc.GetElement(viewport.ViewId); if (!(viewPlan is ViewPlan)) diff --git a/RookieStation/Drawing/ExecuteCmds/CmdCreateWires.cs b/RookieStation/Drawing/ExecuteCmds/CmdCreateWires.cs new file mode 100644 index 0000000..26ac7cc --- /dev/null +++ b/RookieStation/Drawing/ExecuteCmds/CmdCreateWires.cs @@ -0,0 +1,143 @@ +using Autodesk.Revit.DB; +using Autodesk.Revit.DB.Electrical; +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Selection; +using RookieStation.Extension; +using RookieStation.ParcelAreaModule.Views; +using RookieStation.Utils; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Controls; + +namespace RookieStation.Drawing.ExecuteCmds +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + internal class CmdCreateWires : IExternalCommand + { + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + UIApplication uiapp = commandData.Application; + UIDocument uidoc = uiapp.ActiveUIDocument; + Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; + Document doc = uidoc.Document; + bool isContinue = true; + + try + { + while (isContinue) + { + //var refers = uidoc.Selection.PickObjects(ObjectType.Element, new SelectFilter(), "请选择灯具"); + //var instances = refers.Select(refer => doc.GetElement(refer) as FamilyInstance); + var instances = uidoc.Selection.PickElementsByRectangle(new SelectFilter(), "请选择灯具").Cast(); + //var instances = refers.Select(refer => doc.GetElement(refer) as FamilyInstance).OrderBy(fi => RsRevitUtils.GetLocationPointByElement(fi).X).ThenBy(fi => RsRevitUtils.GetLocationPointByElement(fi).Y); + var instancesGroupByX = instances.GroupBy(fi => RsRevitUtils.GetLocationPointByElement(fi).X); + var instancesGroupByY = instances.GroupBy(fi => RsRevitUtils.GetLocationPointByElement(fi).Y); + IOrderedEnumerable instancesOrdered = null; + if (instancesGroupByX.Count() <= instancesGroupByY.Count()) + { + instancesOrdered = instances.OrderBy(fi => RsRevitUtils.GetLocationPointByElement(fi).X).ThenBy(fi => RsRevitUtils.GetLocationPointByElement(fi).Y); + } + else + { + instancesOrdered = instances.OrderBy(fi => RsRevitUtils.GetLocationPointByElement(fi).Y).ThenBy(fi => RsRevitUtils.GetLocationPointByElement(fi).X); + } + doc.InvokeGroup(tg => + { + for (int i = 0; i < instancesOrdered.Count() - 1; i++) + { + var fi = instancesOrdered.ElementAt(i); + var fi1 = instancesOrdered.ElementAt(i + 1); + CreateWire(doc, fi, fi1, i); + } + + foreach (var instance in instances) + { + FamilyInstance closestInstance = null; + if (instance.MEPModel.ConnectorManager.UnusedConnectors.Size > 0) + { + var p = RsRevitUtils.GetLocationPointByElement(instance); + var mindistance = 10.0; + foreach (var instanceSearched in instances) + { + var sp = RsRevitUtils.GetLocationPointByElement(instanceSearched); + var sdistance = sp.DistanceTo(p); + if (sdistance < mindistance && sdistance != 0) + { + closestInstance = instanceSearched; + mindistance = sdistance; + } + } + CreateWire(doc, instance, closestInstance, 0); + } + } + }, "创建导线"); + } + } + catch (Autodesk.Revit.Exceptions.OperationCanceledException) + { + } + + return Result.Succeeded; + } + + public void CreateWire(Document doc, FamilyInstance firstInstance, FamilyInstance endInstance, int i) + { + var wireTypeId = doc.GetDefaultElementTypeId(ElementTypeGroup.WireType); + var firstConnectors = firstInstance.MEPModel.ConnectorManager.Connectors; + Connector connector = null; + foreach (Connector it in firstConnectors) + { + connector = it; + break; + } + var loc = connector.Origin; + + var endConnectors = endInstance.MEPModel.ConnectorManager.Connectors; + + Connector connector1 = null; + + foreach (Connector it in endConnectors) + { + connector1 = it; + break; + } + var loc1 = connector1.Origin; + List pts = new List(); + pts.Add(loc); + var l = Line.CreateBound(loc, loc1); + if (l.Length > 2200 / 304.8) + { + return; + } + var off = l.Direction.CrossProduct(XYZ.BasisZ * 2); + var cp = (loc + loc1) / 2; + if (i % 2 == 0) + { + pts.Add(off.Add(cp)); + } + else + { + pts.Add(off.Negate().Add(cp)); + } + pts.Add(loc1); + doc.Invoke(ts => + { + Wire.Create(doc, wireTypeId, doc.ActiveView.Id, WiringType.Arc, pts, connector, connector1); + }, "创建导线"); + } + + internal class SelectFilter : ISelectionFilter + { + public bool AllowElement(Autodesk.Revit.DB.Element elem) + { + return elem is T && elem.Category.Id.IntegerValue == -2001120; + } + + public bool AllowReference(Reference refer, XYZ point) + { + return true; + } + } + } +} \ No newline at end of file diff --git a/RookieStation/Drawing/ExecuteCmds/CmdUnifyViewportOnViewSheet.cs b/RookieStation/Drawing/ExecuteCmds/CmdUnifyViewportOnViewSheet.cs new file mode 100644 index 0000000..f284c7f --- /dev/null +++ b/RookieStation/Drawing/ExecuteCmds/CmdUnifyViewportOnViewSheet.cs @@ -0,0 +1,147 @@ +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Selection; +using RookieStation.Extension; +using RookieStation.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Linq; + +namespace RookieStation.Drawing.ExecuteCmds +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + internal class CmdUnifyViewportOnViewSheet : IExternalCommand + { + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + UIApplication uiapp = commandData.Application; + UIDocument uidoc = uiapp.ActiveUIDocument; + Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; + Document doc = uidoc.Document; + DocumentSet docset = uiapp.Application.Documents; + if (uidoc.ActiveView.ViewType != ViewType.FloorPlan) + { + message = "请打开楼层平面视图"; + } + var uiViews = uidoc.GetOpenUIViews(); + var uiviews = from v in uiViews + where v.ViewId == doc.ActiveView.Id + select v; + var uiview = uiviews.FirstOrDefault(); + uiview.ZoomToFit(); + var pts = uiview.GetZoomCorners(); + try + { + //var box = uidoc.Selection.PickBox(PickBoxStyle.Directional, "请选择出图的范围框"); + var viewplans = new FilteredElementCollector(doc).OfClass(typeof(ViewPlan)).Cast().Where(v => v.ViewType == ViewType.FloorPlan && v.IsTemplate == false); + var viewSheets = new FilteredElementCollector(doc).OfClass(typeof(ViewSheet)).Cast().Where(v => v.ViewType == ViewType.DrawingSheet && v.IsTemplate == false); + var titleBlocks = new FilteredElementCollector(doc).OfClass(typeof(FamilySymbol)).OfCategory(BuiltInCategory.OST_TitleBlocks).Cast().Where(s => s.Name.Contains("A3")); + var min = new XYZ(0.0229658792650917, 0.0229658792650921, 0); + var max = new XYZ(1.15813648293937, 0.951443569553805, 0); + var mid = (max + min) / 2; + doc.InvokeGroup(tg => + { + doc.Invoke(ts => + { + foreach (var plan in viewplans) + { + var isDrawing = plan.GetParameters("视图分类").FirstOrDefault().AsString().Contains("出图"); + var isDetailDrawing = plan.Name.Contains("大样"); + + if (!isDrawing || isDetailDrawing) + { + continue; + } + plan.CropBoxActive = true; + BoundingBoxXYZ boundingBox = GetBoundingBoxXYZ(pts); + //BoundingBoxXYZ boundingBox = GetBoundingBoxXYZ(box); + plan.CropBoxVisible = true; + plan.CropBox = boundingBox; + var sheets = from sheet in viewSheets + where sheet.Name == plan.Name + select sheet; + var hasplace = plan.get_Parameter(BuiltInParameter.VIEWPORT_SHEET_NUMBER).HasValue; + var sheetNumber = plan.get_Parameter(BuiltInParameter.VIEWPORT_SHEET_NUMBER).AsString(); + var sheetName = plan.get_Parameter(BuiltInParameter.VIEWPORT_SHEET_NAME).AsString(); + + if (hasplace) + { + var existsheets = from sheet in viewSheets + where sheet.Name == sheetName && sheet.SheetNumber == sheetNumber + select sheet; + var existsheet = existsheets.FirstOrDefault(); + existsheet.Name = plan.Name; + var ports = existsheet.GetAllViewports().Where(id => + { + var p = doc.GetElement(id) as Viewport; + return p.ViewId == plan.Id; + }).Select(id => doc.GetElement(id) as Viewport); + var port = ports.FirstOrDefault(); + port.SetBoxCenter(mid); + //doc.Regenerate(); + + //port.GetLabelOutline().MinimumPoint = new XYZ(0.835, 0.0214, 0); + //port.GetLabelOutline().MaximumPoint = new XYZ(1.12266834170198, 0.0803862248629855, -0.0691517320142279); + } + else + { + ViewSheet planSheet; + if (sheets.Count() == 0) + { + planSheet = ViewSheet.Create(doc, titleBlocks.FirstOrDefault().Id); + } + else + { + planSheet = sheets.FirstOrDefault(); + } + planSheet.Name = plan.Name; + var port = Viewport.Create(doc, planSheet.Id, plan.Id, mid); + //doc.Regenerate(); + //port.GetLabelOutline().MinimumPoint = new XYZ(0.835196807743834, 0.0213681401338879, -0.0691517320142279); + //port.GetLabelOutline().MaximumPoint = new XYZ(1.12266834170198, 0.0803862248629855, -0.0691517320142279); + } + } + }, "设置裁剪框"); + }, "统一图纸平面的视口位置"); + } + catch (OperationCanceledException) + { + } + catch (Exception ex) + { + Log.WriteLog(ex.Message); + } + + return Result.Succeeded; + } + + public BoundingBoxXYZ GetBoundingBoxXYZ(IList pts) + { + BoundingBoxXYZ boundingBox = new BoundingBoxXYZ(); + boundingBox.Min = new XYZ(pts[0].X, pts[0].Y, 0); + boundingBox.Max = new XYZ(pts[1].X, pts[1].Y, 0); + return boundingBox; + } + + public BoundingBoxXYZ GetBoundingBoxXYZ(PickedBox pb) + { + BoundingBoxXYZ boundingBox = new BoundingBoxXYZ(); + double minX; + double minY; + double maxX; + double maxY; + minX = Math.Min(pb.Min.X, pb.Max.X); + minY = Math.Min(pb.Min.Y, pb.Max.Y); + maxX = Math.Max(pb.Min.X, pb.Max.X); + maxY = Math.Max(pb.Min.Y, pb.Max.Y); + + boundingBox.Max = new XYZ(maxX, maxY, 0); + boundingBox.Min = new XYZ(minX, minY, 0); + return boundingBox; + } + } +} \ No newline at end of file diff --git a/RookieStation/Drawing/ExecuteCmds/UnifyViewPlanCropBoxAndPositionOnViewSheet.cs b/RookieStation/Drawing/ExecuteCmds/UnifyViewPlanCropBoxAndPositionOnViewSheet.cs deleted file mode 100644 index 80dd283..0000000 --- a/RookieStation/Drawing/ExecuteCmds/UnifyViewPlanCropBoxAndPositionOnViewSheet.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Autodesk.Revit.DB; -using Autodesk.Revit.UI; -using Autodesk.Revit.UI.Selection; -using RookieStation.Extension; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace RookieStation.Drawing.ExecuteCmds -{ - [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] - [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] - internal class UnifyViewPlanCropBoxAndPositionOnViewSheet : IExternalCommand - { - public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) - { - UIApplication uiapp = commandData.Application; - UIDocument uidoc = uiapp.ActiveUIDocument; - Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; - Document doc = uidoc.Document; - DocumentSet docset = uiapp.Application.Documents; - var box = uidoc.Selection.PickBox(PickBoxStyle.Crossing, "请选择出图的范围框"); - var viewplans = new FilteredElementCollector(doc).OfClass(typeof(ViewPlan)).Cast(); - ICollection wallinstances = new FilteredElementCollector(doc).OfClass(typeof(ViewPlan)).WhereElementIsNotElementType().ToElements(); - //min (0.0229658792650917, 0.0229658792650921, 0) - //max (1.15813648293937, 0.951443569553805, 0) - doc.InvokeGroup(tg => - { - doc.Invoke(ts => - { - foreach (var v in viewplans) - { - //var isdrawing = item.GetParameters("视图分类").FirstOrDefault().AsString().Contains("出图"); - - //if (isdrawing) - //{ - //} - v.CropBoxActive = true; - BoundingBoxXYZ boundingBox = new BoundingBoxXYZ(); - boundingBox.Max = box.Max; - boundingBox.Min = box.Min; - v.CropBox = boundingBox; - } - }, "设置裁剪框"); - }, "统一图纸平面的视口"); - - return Result.Succeeded; - } - } -} \ No newline at end of file diff --git a/RookieStation/MailingAreaModule/ExecuteCmds/CmdPlaceReceptionArea.cs b/RookieStation/MailingAreaModule/ExecuteCmds/CmdPlaceReceptionArea.cs index 8b783ea..3d6a836 100644 --- a/RookieStation/MailingAreaModule/ExecuteCmds/CmdPlaceReceptionArea.cs +++ b/RookieStation/MailingAreaModule/ExecuteCmds/CmdPlaceReceptionArea.cs @@ -121,9 +121,9 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds Line referline = RsRevitUtils.GetGuideGeometryAndDeleteGuide(doc, eleIdsAdded); double backgroundWallLength = referline.Length; - if (backgroundWallLength < 1500 / 304.8) + if (backgroundWallLength < 3000 / 304.8) { - TaskDialog.Show("温馨提示", "距离太接"); + TaskDialog.Show("温馨提示", "长度需大于3000mm"); return Result.Cancelled; } List wallIds = new List(); @@ -152,8 +152,8 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds if (n == 0) { var offestline = referline.CreateOffset(aluminumPlasticPanelThickness / 2 + baseLayerThickness, -XYZ.BasisZ); - var wall = Wall.Create(doc, offestline, aluminumPlasticPanelType.Id, baseLevel.Id, aluminumPlasticPanelHeight, skirtingLineHeight, false, false); - wallIds.Add(wall.Id); + var skirtingLinewall = Wall.Create(doc, offestline, aluminumPlasticPanelType.Id, baseLevel.Id, aluminumPlasticPanelHeight, skirtingLineHeight, false, false); + wallIds.Add(skirtingLinewall.Id); } else { @@ -168,11 +168,11 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds } Line line = Line.CreateBound(startpoint, endpoint); var offestline = line.CreateOffset(aluminumPlasticPanelThickness / 2 + baseLayerThickness, -XYZ.BasisZ); - var wall = Wall.Create(doc, offestline, aluminumPlasticPanelType.Id, baseLevel.Id, aluminumPlasticPanelHeight, skirtingLineHeight, false, false); + var aluminumPlasticPanelwall = Wall.Create(doc, offestline, aluminumPlasticPanelType.Id, baseLevel.Id, aluminumPlasticPanelHeight, skirtingLineHeight, false, false); //不允许连接 - WallUtils.DisallowWallJoinAtEnd(wall, 0); + WallUtils.DisallowWallJoinAtEnd(aluminumPlasticPanelwall, 0); //curves.Add() - wallIds.Add(wall.Id); + wallIds.Add(aluminumPlasticPanelwall.Id); } } @@ -181,13 +181,13 @@ namespace RookieStation.MailingAreaModule.ExecuteCmds wallIds.Add(skirtingwall.Id); var baseLayerOffestLine = referline.CreateOffset(baseLayerThickness / 2, -XYZ.BasisZ); - var baseLayerWall = Wall.Create(doc, baseLayerOffestLine, baseLayerType.Id, baseLevel.Id, UserConstant.Height / 304.8, 0, false, false); + var baseLayerWall = Wall.Create(doc, baseLayerOffestLine, baseLayerType.Id, baseLevel.Id, skirtingLineHeight + aluminumPlasticPanelHeight, 0, false, false); wallIds.Add(baseLayerWall.Id); //高度大于3000才有灰色乳胶漆 if (UserConstant.Height > 3000) { double baseHeight = aluminumPlasticPanelHeight + skirtingLineHeight; - var greyEmulsionPaintOffestLine = referline.CreateOffset(baseLayerThickness + greyEmulsionPaintWidth / 2, -XYZ.BasisZ); + var greyEmulsionPaintOffestLine = referline.CreateOffset(greyEmulsionPaintWidth / 2, -XYZ.BasisZ); Wall greyPaintWall = Wall.Create(doc, greyEmulsionPaintOffestLine, greyEmulsionPaintType.Id, baseLevel.Id, UserConstant.Height / 304.8 - baseHeight, baseHeight, false, false); wallIds.Add(greyPaintWall.Id); } diff --git a/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml b/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml index b7d634c..bb01262 100644 --- a/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml +++ b/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml @@ -4,7 +4,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:hc="https://handyorg.github.io/handycontrol" - xmlns:local="clr-namespace:RookieStation" + xmlns:local="clr-namespace:RookieStation.MailingAreaModule.Views" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Width="126" Height="338" @@ -51,7 +51,7 @@ hc:InfoElement.Title="铝塑板高度:" hc:InfoElement.TitlePlacement="Left" PreviewTextInput="tb_PreviewTextInput" - Text="2400" + Text="2440" TextAlignment="Center" /> diff --git a/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml.cs b/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml.cs index caaa866..1167d8b 100644 --- a/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml.cs +++ b/RookieStation/MailingAreaModule/Views/WpfReceptionArea.xaml.cs @@ -36,6 +36,7 @@ namespace RookieStation.MailingAreaModule.Views public WpfReceptionArea() { InitializeComponent(); + tbAluminumpLasticPanelHeight.Text = (UserConstant.Height / 3 * 2).ToString(); } diff --git a/RookieStation/ParcelAreaModule/ExecuteCmds/CmdArrangeShelfCards.cs b/RookieStation/ParcelAreaModule/ExecuteCmds/CmdArrangeShelfCards.cs index b0ab12e..dae164f 100644 --- a/RookieStation/ParcelAreaModule/ExecuteCmds/CmdArrangeShelfCards.cs +++ b/RookieStation/ParcelAreaModule/ExecuteCmds/CmdArrangeShelfCards.cs @@ -44,29 +44,8 @@ namespace RookieStation.ParcelAreaModule.ExecuteCmds { loader.UnhookAssemblyResolve(); } - //if (shelfcards.IsPlace) - //{ - // PlaceCards(shelfcards, uidoc); - //} - //else - //{ - // NumberCards(shelfcards, uidoc); - //} + return Result.Succeeded; - - //if (IsVisible("端牌编号")) - //{ - // WinIntPtr.ShowAndActive("端牌编号"); - //} - //else - //{ - // cardsPlacement = new WpfNumberShelfCard(); - - // System.Windows.Interop.WindowInteropHelper mainUI = new System.Windows.Interop.WindowInteropHelper(cardsPlacement); - // mainUI.Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle; - - // cardsPlacement.ShowDialog(); - //} } //public static bool IsVisible(string winname) diff --git a/RookieStation/ProjectConfig/ExcuteCmd/CmdProjectSettings.cs b/RookieStation/ProjectConfig/ExcuteCmd/CmdProjectSettings.cs index b172640..4bef0b6 100644 --- a/RookieStation/ProjectConfig/ExcuteCmd/CmdProjectSettings.cs +++ b/RookieStation/ProjectConfig/ExcuteCmd/CmdProjectSettings.cs @@ -34,8 +34,8 @@ namespace RookieStation.ProjectConfig.ExecuteCmds { try { - var scale = Convert.ToInt32(Properties.Settings.Default.Scale); - v.get_Parameter(BuiltInParameter.VIEW_SCALE).Set(scale); + var scale = Properties.Settings.Default.Scale; + v.get_Parameter(BuiltInParameter.VIEW_SCALE).SetValueString(scale); } catch (Exception ex) { diff --git a/RookieStation/ProjectConfig/Views/WpfProjectSettings.xaml b/RookieStation/ProjectConfig/Views/WpfProjectSettings.xaml index 2eb391b..beb425b 100644 --- a/RookieStation/ProjectConfig/Views/WpfProjectSettings.xaml +++ b/RookieStation/ProjectConfig/Views/WpfProjectSettings.xaml @@ -3,6 +3,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:local="clr-namespace:RookieStation.ProjectConfig" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:sys="clr-namespace:System;assembly=mscorlib" @@ -76,6 +77,7 @@ Grid.Column="1" Height="30" VerticalContentAlignment="Center" + hc:InfoElement.Necessary="True" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="tb_PreviewTextInput" TextAlignment="Center" /> @@ -99,8 +101,8 @@ Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" - Text="图纸比例:1/ " /> - + + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap UnifyViewport { + get { + object obj = ResourceManager.GetObject("UnifyViewport", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -280,6 +290,16 @@ namespace RookieStation.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap Wire { + get { + object obj = ResourceManager.GetObject("Wire", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/RookieStation/Properties/Resources.resx b/RookieStation/Properties/Resources.resx index 1b23526..de5e115 100644 --- a/RookieStation/Properties/Resources.resx +++ b/RookieStation/Properties/Resources.resx @@ -175,6 +175,9 @@ ..\Resources\SwitchLegend.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\视口.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\ViewPlanDim.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -184,6 +187,9 @@ ..\resources\wallfinishes.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Wire.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\WorkSchedule.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/RookieStation/Properties/Settings.Designer.cs b/RookieStation/Properties/Settings.Designer.cs index 0d0fa69..abd4693 100644 --- a/RookieStation/Properties/Settings.Designer.cs +++ b/RookieStation/Properties/Settings.Designer.cs @@ -75,7 +75,7 @@ namespace RookieStation.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("C:\\ProgramData\\Autodesk\\Revit\\Addins\\2020\\RsLibrary\\FamilyLibrary")] + [global::System.Configuration.DefaultSettingValueAttribute("C:\\ProgramData\\Autodesk\\Revit\\Addins\\2020\\RsTools\\FamilyLibrary")] public string FamilyFolder { get { return ((string)(this["FamilyFolder"])); diff --git a/RookieStation/Properties/Settings.settings b/RookieStation/Properties/Settings.settings index 0361dcd..515e48c 100644 --- a/RookieStation/Properties/Settings.settings +++ b/RookieStation/Properties/Settings.settings @@ -18,7 +18,7 @@ </ArrayOfString> - C:\ProgramData\Autodesk\Revit\Addins\2020\RsLibrary\FamilyLibrary + C:\ProgramData\Autodesk\Revit\Addins\2020\RsTools\FamilyLibrary 漳州职业技术学院 diff --git a/RookieStation/Resources/Wire.png b/RookieStation/Resources/Wire.png new file mode 100644 index 0000000..2afe36e Binary files /dev/null and b/RookieStation/Resources/Wire.png differ diff --git a/RookieStation/Resources/视口.png b/RookieStation/Resources/视口.png new file mode 100644 index 0000000..5641dbf Binary files /dev/null and b/RookieStation/Resources/视口.png differ diff --git a/RookieStation/RookieStation.csproj b/RookieStation/RookieStation.csproj index d2225b8..fc206c3 100644 --- a/RookieStation/RookieStation.csproj +++ b/RookieStation/RookieStation.csproj @@ -100,6 +100,7 @@ ProgressMonitorView.xaml + @@ -107,7 +108,8 @@ - + + @@ -162,6 +164,7 @@ + @@ -201,6 +204,9 @@ SettingsSingleFileGenerator Settings.Designer.cs + + Always + Always @@ -219,6 +225,9 @@ Always + + Always + Always @@ -331,9 +340,6 @@ Always - - Always - Always @@ -446,8 +452,10 @@ + + Always diff --git a/RookieStation/RsApp.cs b/RookieStation/RsApp.cs index 873ea21..f2b922e 100644 --- a/RookieStation/RsApp.cs +++ b/RookieStation/RsApp.cs @@ -141,6 +141,8 @@ namespace RookieStation.RibbonMenu CreatePushButton(drawingPanel, "平面标注", Properties.Resources.ViewPlanDim, ViewPlanCmdEnabled); CreatePushButton(drawingPanel, "立面标注", Properties.Resources.ViewSectionDim, ViewSectionCmdEnabled); + CreatePushButton(drawingPanel, "创建导线", Properties.Resources.Wire, ViewPlanCmdEnabled); + CreatePushButton(drawingPanel, "统一视口", Properties.Resources.UnifyViewport, ViewPlanCmdEnabled); CreatePushButton(drawingPanel, "批量导出DWG", Properties.Resources.ExportDWG, null); //通用面板 diff --git a/RookieStation/RsLibrary/FamilyLibrary/其他/人流箭头.rfa b/RookieStation/RsLibrary/FamilyLibrary/其他/人流箭头.rfa new file mode 100644 index 0000000..78c6644 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/其他/人流箭头.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0002.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0002.rfa new file mode 100644 index 0000000..f99bd1d Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0002.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0003.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0003.rfa new file mode 100644 index 0000000..2687149 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0003.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0004.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0004.rfa new file mode 100644 index 0000000..cc5a333 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.0004.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.rfa index c020e7e..42ab707 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.rfa and b/RookieStation/RsLibrary/FamilyLibrary/出入口/三轴手动闸机.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0002.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0002.rfa new file mode 100644 index 0000000..b772bcb Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0002.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0003.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0003.rfa new file mode 100644 index 0000000..6b8248f Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0003.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0004.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0004.rfa new file mode 100644 index 0000000..f87771a Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.0004.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.rfa index f797955..d0edf44 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.rfa and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-右.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0003.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0003.rfa new file mode 100644 index 0000000..e22e874 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0003.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0004.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0004.rfa new file mode 100644 index 0000000..49aac7f Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0004.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0005.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0005.rfa new file mode 100644 index 0000000..e2bcea3 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.0005.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.rfa index 42c1c9f..5f01a47 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.rfa and b/RookieStation/RsLibrary/FamilyLibrary/出入口/收检台-左.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/出入口/智能翼闸.rfa b/RookieStation/RsLibrary/FamilyLibrary/出入口/智能翼闸.rfa new file mode 100644 index 0000000..d1ec454 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/出入口/智能翼闸.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0002.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0002.rfa new file mode 100644 index 0000000..91a0e1f Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0002.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0003.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0003.rfa new file mode 100644 index 0000000..43e2449 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0003.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0004.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0004.rfa new file mode 100644 index 0000000..e2c499b Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.0004.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.rfa index 7c13e69..a9f5f0f 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.rfa and b/RookieStation/RsLibrary/FamilyLibrary/家具/寄件接待台.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1-5m.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1-5m.rfa new file mode 100644 index 0000000..b9cb155 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1-5m.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1.5m.0001.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1.5m.0001.rfa new file mode 100644 index 0000000..0edb919 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1.5m.0001.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1.5m.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1.5m.rfa new file mode 100644 index 0000000..84bb5b0 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-1.5m.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3-0m.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3-0m.rfa new file mode 100644 index 0000000..9a931c9 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3-0m.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3.0m.0001.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3.0m.0001.rfa new file mode 100644 index 0000000..96aaa21 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3.0m.0001.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3.0m.rfa b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3.0m.rfa new file mode 100644 index 0000000..df2848a Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/家具/绿动回收台-3.0m.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/标识标牌/侧招灯箱.rfa b/RookieStation/RsLibrary/FamilyLibrary/标识标牌/侧招灯箱.rfa deleted file mode 100644 index d7606b2..0000000 Binary files a/RookieStation/RsLibrary/FamilyLibrary/标识标牌/侧招灯箱.rfa and /dev/null differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/标识标牌/壁挂灯箱.0001.rfa b/RookieStation/RsLibrary/FamilyLibrary/标识标牌/壁挂灯箱.0001.rfa new file mode 100644 index 0000000..1431dc0 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/标识标牌/壁挂灯箱.0001.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/标识标牌/壁挂灯箱.rfa b/RookieStation/RsLibrary/FamilyLibrary/标识标牌/壁挂灯箱.rfa new file mode 100644 index 0000000..d4e97e7 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/标识标牌/壁挂灯箱.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0005.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0005.rfa deleted file mode 100644 index 7287b94..0000000 Binary files a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0005.rfa and /dev/null differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0006.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0006.rfa deleted file mode 100644 index d66e781..0000000 Binary files a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0006.rfa and /dev/null differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0007.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0007.rfa deleted file mode 100644 index a4787b0..0000000 Binary files a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0007.rfa and /dev/null differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0008.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0008.rfa new file mode 100644 index 0000000..59d9e78 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0008.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0009.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0009.rfa new file mode 100644 index 0000000..8ecd231 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0009.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0010.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0010.rfa new file mode 100644 index 0000000..0689ec4 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.0010.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.rfa index 59d9e78..4657df5 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.rfa and b/RookieStation/RsLibrary/FamilyLibrary/灯具/明装筒灯.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.0003.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.0003.rfa new file mode 100644 index 0000000..354be5a Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.0003.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.rfa b/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.rfa index 354be5a..3ed4126 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.rfa and b/RookieStation/RsLibrary/FamilyLibrary/灯具/轨道射灯.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.0001.rfa b/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.0001.rfa new file mode 100644 index 0000000..e4dad91 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.0001.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.0002.rfa b/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.0002.rfa new file mode 100644 index 0000000..d251a18 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.0002.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.rfa b/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.rfa index e4dad91..d04b3e8 100644 Binary files a/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.rfa and b/RookieStation/RsLibrary/FamilyLibrary/货架/货架端牌.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/门/幕墙门-双开地弹玻璃门.0001.rfa b/RookieStation/RsLibrary/FamilyLibrary/门/幕墙门-双开地弹玻璃门.0001.rfa new file mode 100644 index 0000000..4e4de68 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/门/幕墙门-双开地弹玻璃门.0001.rfa differ diff --git a/RookieStation/RsLibrary/FamilyLibrary/门/幕墙门-双开地弹玻璃门.rfa b/RookieStation/RsLibrary/FamilyLibrary/门/幕墙门-双开地弹玻璃门.rfa new file mode 100644 index 0000000..1f3e094 Binary files /dev/null and b/RookieStation/RsLibrary/FamilyLibrary/门/幕墙门-双开地弹玻璃门.rfa differ diff --git a/RookieStation/Utils/VistaFolderBrowserDialog.cs b/RookieStation/Utils/VistaFolderBrowserDialog.cs new file mode 100644 index 0000000..33df1c8 --- /dev/null +++ b/RookieStation/Utils/VistaFolderBrowserDialog.cs @@ -0,0 +1,315 @@ +using Microsoft.Win32; +using System; +using System.Runtime.InteropServices; +using System.Windows; +using System.Windows.Interop; + +public sealed class VistaFolderBrowserDialog +{ + public string SelectedPath { get; set; } + + public string SelectedElementName { get; private set; } + + public string[] SeletcedPaths { get; private set; } + + public string[] SelectedElementNames { get; private set; } + + public bool AllowNonStoragePlaces { get; set; } + + public bool Multiselect { get; set; } + + public bool ShowDialog() => ShowDialog(IntPtr.Zero); + + public bool ShowDialog(Window owner) => ShowDialog(owner == null ? IntPtr.Zero : new WindowInteropHelper(owner).Handle); + + public bool ShowDialog(IWin32Window owner) => ShowDialog(owner == null ? IntPtr.Zero : owner.Handle); + + public bool ShowDialog(IntPtr owner) + { + if (Environment.OSVersion.Version.Major < 6) + { + throw new InvalidOperationException("The dialog need at least Windows Vista to work."); + } + + IFileOpenDialog dialog = CreateNativeDialog(); + try + { + SetInitialFolder(dialog); + SetOptions(dialog); + + if (dialog.Show(owner) != 0) + { + return false; + } + + SetDialogResults(dialog); + + return true; + } + finally + { + Marshal.ReleaseComObject(dialog); + } + } + + private void GetPathAndElementName(IShellItem item, out string path, out string elementName) + { + item.GetDisplayName(SIGDN.PARENTRELATIVEFORADDRESSBAR, out elementName); + try + { + item.GetDisplayName(SIGDN.FILESYSPATH, out path); + } + catch (ArgumentException ex) when (ex.HResult == -2147024809) + { + path = null; + } + } + + private IFileOpenDialog CreateNativeDialog() + { + return new FileOpenDialog() as IFileOpenDialog; + } + + private void SetInitialFolder(IFileOpenDialog dialog) + { + IShellItem item; + if (!string.IsNullOrEmpty(SelectedPath)) + { + IntPtr idl; + uint atts = 0; + if (NativeMethods.SHILCreateFromPath(SelectedPath, out idl, ref atts) == 0 + && NativeMethods.SHCreateShellItem(IntPtr.Zero, IntPtr.Zero, idl, out item) == 0) + { + dialog.SetFolder(item); + } + } + } + + private void SetOptions(IFileOpenDialog dialog) + { + dialog.SetOptions(GetDialogOptions()); + } + + private FOS GetDialogOptions() + { + FOS options = FOS.PICKFOLDERS; + if (this.Multiselect) + { + options |= FOS.ALLOWMULTISELECT; + } + if (!AllowNonStoragePlaces) + { + options |= FOS.FORCEFILESYSTEM; + } + return options; + } + + private void SetDialogResults(IFileOpenDialog dialog) + { + IShellItem item; + if (!this.Multiselect) + { + dialog.GetResult(out item); + string path, value; + GetPathAndElementName(item, out path, out value); + this.SelectedPath = path; + this.SeletcedPaths = new[] { path }; + this.SelectedElementName = value; + this.SelectedElementNames = new[] { value }; + } + else + { + IShellItemArray items; + dialog.GetResults(out items); + + uint count; + items.GetCount(out count); + + this.SeletcedPaths = new string[count]; + this.SelectedElementNames = new string[count]; + + for (uint i = 0; i < count; ++i) + { + items.GetItemAt(i, out item); + string path, value; + GetPathAndElementName(item, out path, out value); + this.SeletcedPaths[i] = path; + this.SelectedElementNames[i] = value; + } + + this.SelectedPath = null; + this.SelectedElementName = null; + } + } + + private class NativeMethods + { + [DllImport("shell32.dll")] + public static extern int SHILCreateFromPath([MarshalAs(UnmanagedType.LPWStr)] string pszPath, out IntPtr ppIdl, ref uint rgflnOut); + + [DllImport("shell32.dll")] + public static extern int SHCreateShellItem(IntPtr pidlParent, IntPtr psfParent, IntPtr pidl, out IShellItem ppsi); + + [DllImport("user32.dll")] + public static extern IntPtr GetActiveWindow(); + } + + [ComImport, Guid("43826D1E-E718-42EE-BC55-A1E261C37BFE"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + private interface IShellItem + { + void BindToHandler([In, MarshalAs(UnmanagedType.Interface)] IntPtr pbc, [In] ref Guid bhid, [In] ref Guid riid, out IntPtr ppv); + + void GetParent([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); + + void GetDisplayName([In] SIGDN sigdnName, [MarshalAs(UnmanagedType.LPWStr)] out string ppszName); + + void GetAttributes([In] uint sfgaoMask, out uint psfgaoAttribs); + + void Compare([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, [In] uint hint, out int piOrder); + } + + [ComImport, Guid("B63EA76D-1F85-456F-A19C-48159EFA858B"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + private interface IShellItemArray + { + void BindToHandler([In, MarshalAs(UnmanagedType.Interface)] IntPtr pbc, [In] ref Guid rbhid, [In] ref Guid riid, out IntPtr ppvOut); + + void GetPropertyStore([In] int Flags, [In] ref Guid riid, out IntPtr ppv); + + void GetPropertyDescriptionList([In, MarshalAs(UnmanagedType.Struct)] ref IntPtr keyType, [In] ref Guid riid, out IntPtr ppv); + + void GetAttributes([In, MarshalAs(UnmanagedType.I4)] IntPtr dwAttribFlags, [In] uint sfgaoMask, out uint psfgaoAttribs); + + void GetCount(out uint pdwNumItems); + + void GetItemAt([In] uint dwIndex, [MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); + + void EnumItems([MarshalAs(UnmanagedType.Interface)] out IntPtr ppenumShellItems); + } + + [ComImport, Guid("d57c7288-d4ad-4768-be02-9d969532d960"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), CoClass(typeof(FileOpenDialog))] + private interface IFileOpenDialog + { + [PreserveSig] + int Show([In] IntPtr parent); + + void SetFileTypes([In] uint cFileTypes, [In, MarshalAs(UnmanagedType.Struct)] ref IntPtr rgFilterSpec); + + void SetFileTypeIndex([In] uint iFileType); + + void GetFileTypeIndex(out uint piFileType); + + void Advise([In, MarshalAs(UnmanagedType.Interface)] IntPtr pfde, out uint pdwCookie); + + void Unadvise([In] uint dwCookie); + + void SetOptions([In] FOS fos); + + void GetOptions(out FOS pfos); + + void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); + + void SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); + + void GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); + + void GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); + + void SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); + + void GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); + + void SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); + + void SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); + + void SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); + + void GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); + + void AddPlace([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, FileDialogCustomPlace fdcp); + + void SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); + + void Close([MarshalAs(UnmanagedType.Error)] int hr); + + void SetClientGuid([In] ref Guid guid); + + void ClearClientData(); + + void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); + + void GetResults([MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppenum); + + void GetSelectedItems([MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppsai); + } + + [ComImport, Guid("DC1C5A9C-E88A-4dde-A5A1-60F82A20AEF7")] + private class FileOpenDialog + { + } + + private enum SIGDN : uint + { + DESKTOPABSOLUTEEDITING = 0x8004c000, + + DESKTOPABSOLUTEPARSING = 0x80028000, + + FILESYSPATH = 0x80058000, + + NORMALDISPLAY = 0, + + PARENTRELATIVE = 0x80080001, + + PARENTRELATIVEEDITING = 0x80031001, + + PARENTRELATIVEFORADDRESSBAR = 0x8007c001, + + PARENTRELATIVEPARSING = 0x80018001, + + URL = 0x80068000 + } + + [Flags] + private enum FOS + { + ALLNONSTORAGEITEMS = 0x80, + + ALLOWMULTISELECT = 0x200, + + CREATEPROMPT = 0x2000, + + DEFAULTNOMINIMODE = 0x20000000, + + DONTADDTORECENT = 0x2000000, + + FILEMUSTEXIST = 0x1000, + + FORCEFILESYSTEM = 0x40, + + FORCESHOWHIDDEN = 0x10000000, + + HIDEMRUPLACES = 0x20000, + + HIDEPINNEDPLACES = 0x40000, + + NOCHANGEDIR = 8, + + NODEREFERENCELINKS = 0x100000, + + NOREADONLYRETURN = 0x8000, + + NOTESTFILECREATE = 0x10000, + + NOVALIDATE = 0x100, + + OVERWRITEPROMPT = 2, + + PATHMUSTEXIST = 0x800, + + PICKFOLDERS = 0x20, + + SHAREAWARE = 0x4000, + + STRICTFILETYPES = 4 + } +} \ No newline at end of file diff --git a/RookieStation/app.config b/RookieStation/app.config index 0d7d565..f9f492a 100644 --- a/RookieStation/app.config +++ b/RookieStation/app.config @@ -25,7 +25,7 @@ - C:\ProgramData\Autodesk\Revit\Addins\2020\RsLibrary\FamilyLibrary + C:\ProgramData\Autodesk\Revit\Addins\2020\RsTools\FamilyLibrary 漳州职业技术学院 diff --git a/RookieStationSetup/RookieStationSetup.vdproj b/RookieStationSetup/RookieStationSetup.vdproj index ff2fe17..0ff7ebc 100644 --- a/RookieStationSetup/RookieStationSetup.vdproj +++ b/RookieStationSetup/RookieStationSetup.vdproj @@ -411,12 +411,6 @@ } "Entry" { - "MsmKey" = "8:_9DD160189CFD41F5B9852D6C05F96F45" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_9E53E94CA4C84976ACF61A45CF3C085E" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -525,6 +519,12 @@ } "Entry" { + "MsmKey" = "8:_C90548C0E250410999B35113FBE05958" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_C93A254F3D5E4FDBAE49E9981D5FA10D" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -2160,26 +2160,6 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9DD160189CFD41F5B9852D6C05F96F45" - { - "SourcePath" = "8:..\\RookieStation\\bin\\Release\\RsLibrary\\FamilyLibrary\\标识标牌\\侧招灯箱.rfa" - "TargetName" = "8:侧招灯箱.rfa" - "Tag" = "8:" - "Folder" = "8:_B551F2A6C0904D6BBC32D147053B2218" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9E53E94CA4C84976ACF61A45CF3C085E" { "SourcePath" = "8:..\\RookieStation\\bin\\Release\\RsLibrary\\Texture\\菜鸟驿站寄件业务收费标准(210_297竖版).jpg" @@ -2482,6 +2462,26 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C90548C0E250410999B35113FBE05958" + { + "SourcePath" = "8:..\\RookieStation\\bin\\Release\\RsLibrary\\FamilyLibrary\\标识标牌\\壁挂灯箱.rfa" + "TargetName" = "8:壁挂灯箱.rfa" + "Tag" = "8:" + "Folder" = "8:_B551F2A6C0904D6BBC32D147053B2218" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C93A254F3D5E4FDBAE49E9981D5FA10D" { "SourcePath" = "8:..\\RookieStation\\bin\\Release\\RsLibrary\\MainMaterials\\灰色乳胶漆.png" @@ -3258,15 +3258,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:菜鸟驿站工具集" - "ProductCode" = "8:{4B2A717E-F947-4900-B5F1-1A37FC1A5984}" - "PackageCode" = "8:{504731B2-B217-4AED-AEF6-5511412AB677}" + "ProductCode" = "8:{67534FBD-95B2-49AC-A7EF-14FAF44FE06A}" + "PackageCode" = "8:{998F4BCF-4E63-4C8C-A8A7-3901B6D7EE28}" "UpgradeCode" = "8:{127EC3EC-7539-468B-84EA-E1ECDD6204E6}" "AspNetVersion" = "8:2.0.50727.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:1.0.4" + "ProductVersion" = "8:1.0.5" "Manufacturer" = "8:YTX Engineering" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:"