diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs
index 04ac589..c7e8957 100644
--- a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs
+++ b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/LectotypeViewModel.cs
@@ -183,8 +183,10 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
var occCable = (it as OccCableForked);
var insulatorGraph = occCable.Children.First() as OccCablesInsulatorGraph;
- var isEncoderLine = GetLineType(insulatorGraph.Imprint,"L");
- var isPowerLine = GetLineType(insulatorGraph.Imprint,"N");
+ var isEncoderLine = GetLineType(insulatorGraph.LibraryName,"编码器线");
+ var isPowerLine = GetLineType(insulatorGraph.LibraryName,"动力线");
+ var isBrakePowerLine = GetLineType(insulatorGraph.LibraryName,"动力刹车线");
+
var encoderLength = 0d;
var powerLength = 0d;
if(double.TryParse(insulatorGraph.CableLength_VH?.StrVal ?? "0",out double length)){
@@ -206,7 +208,7 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
IsPowerLine = isPowerLine,
PowerLineLength = powerLength,
EncoderLineLength = encoderLength,
- CableType = isEncoderLine ? "编码器线" : isPowerLine ? "动力线" : "未知类型",
+ CableType = isEncoderLine ? "编码器线" : isPowerLine ? "动力线" : isBrakePowerLine ? "动力刹车线" : "未知类型",
};
})
.Where(it => it != null)
@@ -389,22 +391,13 @@ public class LectotypeViewModel(string docId) : INotifyPropertyChanged
}
///
/// L -> 动力线 N -> 编码器线
+ /// 20241223 改为按名称判断
///
- ///
+ ///
///
- public bool GetLineType(string imprint, string lineFlag)
+ public bool GetLineType(string libName, string lineFlag)
{
- if (imprint != null && imprint.Contains("-"))
- {
- var vals = imprint.Split('-');
- var val = vals[1];
- Trace.WriteLine($"{vals[1]},{lineFlag},{val.ToUpper() == lineFlag.ToUpper()}");
- return val.ToUpper() == lineFlag.ToUpper();
- }
- else
- {
- return false;
- }
+ return libName.Contains(lineFlag);
}
public string GetAxisNo(string imprint)
{
diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/ScannerViewModel.cs b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/ScannerViewModel.cs
index a33b2a8..4a08ee9 100644
--- a/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/ScannerViewModel.cs
+++ b/Sinvo.EplanHpD.Plugin.WPFUI/ViewModel/ScannerViewModel.cs
@@ -120,6 +120,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel
FlexMessageBox.Error(ex.Message);
}
}
+
private void DebounceTimer_Tick(object sender, EventArgs e)
{
@@ -197,7 +198,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel
_currentFlexDesigner.FitToSelectSet();
_currentFlexDesigner.SelectSet.OnSelectionChanged();
-
+
//_currentFlexDesigner.Camera.GraphicControl._HighlightNode()
/*
List> nodeByEntity = this._occTreeView.GetNodeByEntity(baseOccurrence);
@@ -215,6 +216,8 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.ViewModel
}
}
+
+
public void OthersOccShow(bool show = false)
{
_currentFlexDesigner.GetOrganizerOccurrences().ToList().ForEach(occ =>