| | |
| | | public class YwtBomIniter : BomIniter |
| | | { |
| | | public static PluginSetting setting = PluginSetting.Instance; |
| | | public string jgjNameRegx { get; private set; } = CustomerSetting.Instance["jgjNameRegx"]; |
| | | public string standardNameRegx { get; private set; } = CustomerSetting.Instance["standardNameRegx"]; |
| | | |
| | | public void InitBom(PdmBom bom) |
| | | { |
| | |
| | | bom.xc = false; |
| | | bom.mn = false; |
| | | |
| | | string jgjNameRegx = CustomerSetting.Instance["jgjNameRegx"]; |
| | | string standardNameRegx = CustomerSetting.Instance["standardNameRegx"]; |
| | | |
| | | if (Regex.IsMatch(childName, jgjNameRegx)) |
| | | { |
| | | if (bom._drawInfo != null) { |
| | | if (bom._drawInfo != null) |
| | | { |
| | | bom._drawInfo.HistoryData = NameUtil.IsHistoryDoc(childName); |
| | | } |
| | | |
| | | string docType = bom.properties.Get("文件格式"); |
| | | if (string.IsNullOrEmpty(docType)) |
| | | { |
| | | bom.produceWay = "标准件"; |
| | | bom.produceWay = "加工件"; |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <returns></returns> |
| | | public bool IsJgjPanel(ModelDoc2 doc) |
| | | { |
| | | string jgjNameRegx = CustomerSetting.Instance["jgjNameRegx"]; |
| | | string fileName = Path.GetFileNameWithoutExtension(doc.GetPathName()); |
| | | return Regex.IsMatch(fileName, jgjNameRegx); |
| | | } |
| | | |
| | | public bool IsJgj(ModelDoc2 doc) |
| | | { |
| | | string jgjNameRegx = CustomerSetting.Instance["jgjNameRegx"]; |
| | | string fileName = Path.GetFileNameWithoutExtension(doc.GetPathName()); |
| | | return Regex.IsMatch(fileName, jgjNameRegx); |
| | | } |
| | |
| | | public bool IsStandard(ModelDoc2 doc) |
| | | { |
| | | string fileName = doc.GetPathName(); |
| | | string standardNameRegx = CustomerSetting.Instance["standardNameRegx"]; |
| | | |
| | | fileName = Path.GetFileNameWithoutExtension(fileName); |
| | | return Regex.IsMatch(fileName, standardNameRegx); |
| | | } |