using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace IStation.Bimface { /// /// rvt 模型配置项 /// public class RvtModelConfig { public RvtModelConfig() { //设置 null,在序列化的时候忽略该字段,不出现在序列化后的字符串中 this.texture = null; this.exportDwg = null; this.exportDrawing = null; this.exportPdf = null; this.viewName = null; this.displaylevel = null; this.exportDwgInstance = null; this.exportHiddenObjects = null; this.exportSystemType = null; this.exportProperties = null; this.unit = null; this.exportSchedule = null; } /// /// 转换时是否添加材质。默认为 false /// public bool? texture { get; set; } /// /// rvt2md是否导出dwg文件。默认为 false /// public bool? exportDwg { get; set; } /// /// dwg2md是否导出mdv(矢量化图纸);取值为true时,exportDwg自动设置为true。默认为 false /// public bool? exportDrawing { get; set; } /// /// dwg2md是否导出pdf文件。默认为 false /// public bool? exportPdf { get; set; } /// /// 转换使用的3D视图。默认为 {3D} /// public string viewName { get; set; } /// /// 设置转换的精细度,fine(精细),medium(中等),coarse(粗略)。默认为 fine /// public string displaylevel { get; set; } /// /// 是否导出dwg实例。默认为 false /// public bool? exportDwgInstance { get; set; } /// /// 是否导出三维视图中隐藏的构件。默认为 false /// public bool? exportHiddenObjects { get; set; } /// /// 是否在userData中加入mepSystemType。默认为 false /// public bool? exportSystemType { get; set; } /// /// 是否在导出NWD的属性db文件。默认为 false /// public bool? exportProperties { get; set; } /// /// 设置转换使用的单位,取值"ft"\"feet"\"英尺"采用revit默认的英尺为单位,默认以毫米为单位。默认为空 /// public string unit { get; set; } /// /// 是否使用明细表内容。默认为 false /// public bool? exportSchedule { get; set; } /// /// 获取JSON字典 /// /// public virtual Dictionary GetJsonDict() { var dic = new Dictionary(); if (this.texture != null) dic.Add("texture", this.texture); if (this.exportDwg != null) dic.Add("exportDwg", this.exportDwg); if (this.exportDrawing != null) dic.Add("exportDrawing", this.exportDrawing); if (this.exportPdf != null) dic.Add("exportPdf", this.exportPdf); if (!string.IsNullOrEmpty(this.viewName)) dic.Add("viewName", this.viewName); if (!string.IsNullOrEmpty(this.displaylevel)) dic.Add("displaylevel", this.displaylevel); if (this.exportDwgInstance != null) dic.Add("exportDwgInstance", this.exportDwgInstance); if (this.exportHiddenObjects != null) dic.Add("exportHiddenObjects", this.exportHiddenObjects); if (this.exportSystemType != null) dic.Add("exportSystemType", this.exportSystemType); if (this.exportProperties != null) dic.Add("exportProperties", this.exportProperties); if (!string.IsNullOrEmpty(this.unit)) dic.Add("unit", this.unit); if (this.exportSchedule != null) dic.Add("exportSchedule", this.exportSchedule); return dic; } } }