개정판 88bac50c
dev issue #498 : OPC 연결 임의로 완료
Change-Id: I77059d9cf7c135e74218646ff360445eeac87c85
DTI_PID/SPPIDConverter/ConverterDocking.cs | ||
---|---|---|
94 | 94 |
LMADataSource dataSource = new LMADataSource(); |
95 | 95 |
LMDrawings drawings = new LMDrawings(); |
96 | 96 |
|
97 |
try |
|
97 |
//try
|
|
98 | 98 |
{ |
99 | 99 |
Project_Info _ProjectInfo = Project_Info.GetInstance(); |
100 | 100 |
_ProjectInfo.DefaultPath = Settings.Default.LatestProjectPath; |
... | ... | |
128 | 128 |
|
129 | 129 |
List<SPPID_Document> allDocuments = new List<SPPID_Document>(); |
130 | 130 |
foreach (DataRow row in drawingTable.Rows) |
131 |
{ |
|
132 |
SPPID_Document document = JsonConvert.DeserializeObject<SPPID_Document>(row["DOCUMENT"].ToString()); |
|
133 |
allDocuments.Add(document); |
|
134 |
} |
|
131 |
allDocuments.Add((SPPID_Document)row["DOCUMENT"]); |
|
135 | 132 |
|
136 |
AutoModeling_OPC opc = new AutoModeling_OPC(allDocuments, application, radApp, drawingTable);
|
|
133 |
AutoModeling_OPC opc = new AutoModeling_OPC(allDocuments, application, radApp); |
|
137 | 134 |
opc.Run(); |
138 |
//dynamic doc = application.Drawings.OpenDrawing(drawingTable.Rows[0]["DRAWINGNAME"]); |
|
139 |
|
|
140 |
//doc.CloseDrawing(true); |
|
141 |
|
|
142 |
|
|
143 |
|
|
144 |
//radApp.Documents.Open(sPPID_DBInfo.PlantPath + @"\" + drawingTable.Rows[0]["SPPIDPATH"].ToString()); |
|
145 | 135 |
} |
146 | 136 |
} |
147 | 137 |
else |
... | ... | |
149 | 139 |
MessageBox.Show(Msg.ConnectionFail, Msg.Warning, MessageBoxButtons.OK, MessageBoxIcon.Warning); |
150 | 140 |
} |
151 | 141 |
} |
152 |
catch (Exception ex) |
|
142 |
//catch (Exception ex)
|
|
153 | 143 |
{ |
154 |
MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace); |
|
144 |
//MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
|
|
155 | 145 |
} |
156 |
finally |
|
146 |
//finally
|
|
157 | 147 |
{ |
158 | 148 |
ReleaseCOMObjects(dataSource); |
159 | 149 |
ReleaseCOMObjects(drawings); |
... | ... | |
203 | 193 |
Placement _placement = new Placement(); |
204 | 194 |
LMADataSource dataSource = new LMADataSource();//placement.PIDDataSource; |
205 | 195 |
|
206 |
radApp.Documents.Open(@"\\192.168.0.85\Project_ID2\ID2CPChemSite\PID\P&ID Reference Data\Symbols\Instrumentation\Actuators\Actuator Handwheel.sym"); |
|
207 |
//MessageBox.Show(radApp.ActiveDocument.ActiveSheet.DrawingObjects.Count.ToString() + "\r\n" + radApp.Documents.Count); |
|
208 |
radApp.ActiveDocument.Close(false); |
|
209 |
radApp.Documents.Open(@"\\192.168.0.85\Project_ID2\ID2CPChemSite\PID\P&ID Reference Data\Symbols\Instrumentation\Actuators\Motor Actuator 270 STD.sym"); |
|
210 |
//MessageBox.Show(radApp.ActiveDocument.ActiveSheet.DrawingObjects.Count.ToString() + "\r\n" + radApp.Documents.Count); |
|
211 |
radApp.ActiveDocument.Close(false); |
|
196 |
//radApp.Documents.Open(@"\\192.168.0.85\Project_ID2\ID2CPChemSite\PID\P&ID Reference Data\Symbols\Instrumentation\Actuators\Actuator Handwheel.sym"); |
|
197 |
////MessageBox.Show(radApp.ActiveDocument.ActiveSheet.DrawingObjects.Count.ToString() + "\r\n" + radApp.Documents.Count); |
|
198 |
//radApp.ActiveDocument.Close(false); |
|
199 |
//radApp.Documents.Open(@"\\192.168.0.85\Project_ID2\ID2CPChemSite\PID\P&ID Reference Data\Symbols\Instrumentation\Actuators\Motor Actuator 270 STD.sym"); |
|
200 |
////MessageBox.Show(radApp.ActiveDocument.ActiveSheet.DrawingObjects.Count.ToString() + "\r\n" + radApp.Documents.Count); |
|
201 |
//radApp.ActiveDocument.Close(false); |
|
202 |
|
|
203 |
LMWSSites ss = new LMWSSites(); |
|
204 |
ss.Collect(dataSource); |
|
205 |
|
|
206 |
foreach (LMWSSite item in ss) |
|
207 |
{ |
|
208 |
string aa =item.get_Name(); |
|
209 |
foreach (LMPlantGroup P in item.PlantGroups) |
|
210 |
{ |
|
211 |
|
|
212 |
} |
|
213 |
} |
|
212 | 214 |
} |
213 | 215 |
[DllImport("user32.dll")] |
214 | 216 |
public static extern int FindWindow(string lpClassName, string lpWindowName); |
내보내기 Unified diff