개정판 a19bd6e2
dev issue #1231 : OPC Modeling
Change-Id: I0283118489c2f522d66495ce75a3058ad2c8ccdf
DTI_PID/APIDConverter/AutoModeling.cs | ||
---|---|---|
38 | 38 |
|
39 | 39 |
System.Data.DataTable AvevaSymbolTable = null; |
40 | 40 |
|
41 |
private void SetConvertRule() |
|
42 |
{ |
|
43 |
#region OPC Setting |
|
44 |
document.OPCs.Sort(SortOPC); |
|
45 |
int SortOPC(OPC a, OPC b) |
|
46 |
{ |
|
47 |
if (a.FlowType == FlowType.In) |
|
48 |
return 1; |
|
49 |
else |
|
50 |
return 0; |
|
51 |
} |
|
52 |
#endregion |
|
53 |
} |
|
54 |
|
|
41 | 55 |
public AutoModeling(Model.Document document, System.Data.DataTable AvevaSymbolTable) |
42 | 56 |
{ |
43 | 57 |
this.document = document; |
... | ... | |
88 | 102 |
SplashScreenManager.ShowForm(typeof(APIDSplashScreen), true, true); |
89 | 103 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllStepCount, 2); |
90 | 104 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetDocumentName, document.AvevaDrawingNumber + document.AvevaSheetNumber); |
105 |
SetConvertRule(); |
|
91 | 106 |
|
92 | 107 |
RunLineModeling(); |
108 |
RunOPCModeling(); |
|
93 | 109 |
RunSymbolModeling(); |
94 | 110 |
} |
95 | 111 |
catch (System.Exception ex) |
... | ... | |
115 | 131 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.UpProgress, null); |
116 | 132 |
} |
117 | 133 |
} |
134 |
private void RunOPCModeling() |
|
135 |
{ |
|
136 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllProgress, document.OPCs.Count); |
|
137 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetStep, "OPC Modeling"); |
|
138 |
foreach (var item in document.OPCs) |
|
139 |
{ |
|
140 |
if (item.Aveva.Handle == 0) |
|
141 |
SymbolModeling(item); |
|
142 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.UpProgress, null); |
|
143 |
} |
|
144 |
} |
|
118 | 145 |
private void RunSymbolModeling() |
119 | 146 |
{ |
120 | 147 |
SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllProgress, document.SYMBOLS.Count); |
내보내기 Unified diff