37 |
37 |
|
38 |
38 |
public string DocumentLabelText { get; set; }
|
39 |
39 |
|
40 |
|
int CurrentCount;
|
41 |
40 |
List<Line> NewBranchLines = new List<Line>();
|
42 |
41 |
List<Tuple<string, Line, Line>> BranchLines = new List<Tuple<string, Line, Line>>();
|
43 |
42 |
List<string> ZeroLengthModelItemID = new List<string>();
|
... | ... | |
51 |
50 |
this._ETCSetting = ETCSetting.GetInstance();
|
52 |
51 |
}
|
53 |
52 |
|
54 |
|
private int CalcProgressCount()
|
55 |
|
{
|
56 |
|
int EquipCount = 0;
|
57 |
|
int SymbolCount = 0;
|
58 |
|
int LineCount = 0;
|
59 |
|
int NoteCount = 0;
|
60 |
|
int TextCount = 0;
|
61 |
|
int EndBreakCount = 0;
|
62 |
|
int LineNumberCount = 0;
|
63 |
|
|
64 |
|
EquipCount = document.Equipments.Count;
|
65 |
|
SymbolCount = document.SYMBOLS.Count;
|
66 |
|
SymbolCount = SymbolCount * 3;
|
67 |
|
|
68 |
|
foreach (LineNumber lineNumber in document.LINENUMBERS)
|
69 |
|
foreach (LineRun run in lineNumber.RUNS)
|
70 |
|
foreach (var item in run.RUNITEMS)
|
71 |
|
if (item.GetType() == typeof(Line))
|
72 |
|
LineCount++;
|
73 |
|
foreach (TrimLine trimLine in document.TRIMLINES)
|
74 |
|
foreach (LineRun run in trimLine.RUNS)
|
75 |
|
foreach (var item in run.RUNITEMS)
|
76 |
|
if (item.GetType() == typeof(Line))
|
77 |
|
LineCount++;
|
78 |
|
|
79 |
|
LineCount = LineCount * 2;
|
80 |
|
NoteCount = document.NOTES.Count;
|
81 |
|
TextCount = document.TEXTINFOS.Count;
|
82 |
|
EndBreakCount = document.EndBreaks.Count;
|
83 |
|
LineNumberCount = document.LINENUMBERS.Count;
|
84 |
|
LineNumberCount = LineNumberCount * 2;
|
85 |
|
|
86 |
|
return EquipCount + SymbolCount + LineCount + NoteCount + TextCount + EndBreakCount;
|
87 |
|
}
|
88 |
|
|
89 |
53 |
private void SetSystemEditingCommand(bool value)
|
90 |
54 |
{
|
91 |
55 |
foreach (var item in radApp.Commands)
|
... | ... | |
118 |
82 |
|
119 |
83 |
if (DocumentCoordinateCorrection())
|
120 |
84 |
{
|
121 |
|
SetSystemEditingCommand(false);
|
122 |
|
|
123 |
|
int AllCount = CalcProgressCount();
|
124 |
85 |
Log.Write("Start Modeling");
|
125 |
86 |
SplashScreenManager.ShowForm(typeof(SPPIDSplashScreen), true, true);
|
126 |
87 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetParent, (IntPtr)radApp.HWnd);
|
127 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllStep, AllCount);
|
128 |
88 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetDocumentName, DocumentLabelText);
|
129 |
|
|
130 |
89 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Priority Symbol Modeling");
|
131 |
90 |
prioritySymbols = GetPrioritySymbol();
|
132 |
91 |
foreach (var item in prioritySymbols)
|
... | ... | |
176 |
135 |
NewLineModeling(NewBranchLines[0], true);
|
177 |
136 |
}
|
178 |
137 |
|
179 |
|
// EndBreak Modeling
|
180 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "EndBreaks Modeling");
|
181 |
|
foreach (var item in document.EndBreaks)
|
182 |
|
try
|
183 |
|
{
|
184 |
|
EndBreakModeling(item);
|
185 |
|
}
|
186 |
|
catch (Exception ex)
|
187 |
|
{
|
188 |
|
Log.Write("Error in EndBreakModeling");
|
189 |
|
Log.Write("UID : " + item.UID);
|
190 |
|
Log.Write(ex.Message);
|
191 |
|
Log.Write(ex.StackTrace);
|
192 |
|
}
|
193 |
|
|
194 |
|
|
195 |
|
// SpecBreak Modeling
|
196 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "SpecBreaks Modeling");
|
197 |
|
foreach (var item in document.SpecBreaks)
|
198 |
|
try
|
199 |
|
{
|
200 |
|
SpecBreakModeling(item);
|
201 |
|
}
|
202 |
|
catch (Exception ex)
|
203 |
|
{
|
204 |
|
Log.Write("Error in SpecBreakModeling");
|
205 |
|
Log.Write("UID : " + item.UID);
|
206 |
|
Log.Write(ex.Message);
|
207 |
|
Log.Write(ex.StackTrace);
|
208 |
|
}
|
209 |
|
|
210 |
|
|
211 |
|
// LineNumber Modeling
|
212 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "LineNumbers Modeling");
|
213 |
|
foreach (var item in document.LINENUMBERS)
|
214 |
|
try
|
215 |
|
{
|
216 |
|
LineNumberModeling(item);
|
217 |
|
}
|
218 |
|
catch (Exception ex)
|
219 |
|
{
|
220 |
|
Log.Write("Error in LineNumberModeling");
|
221 |
|
Log.Write("UID : " + item.UID);
|
222 |
|
Log.Write(ex.Message);
|
223 |
|
Log.Write(ex.StackTrace);
|
224 |
|
}
|
225 |
|
|
226 |
|
|
227 |
|
// FlowMark Modeling
|
228 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Flow Mark Modeling");
|
229 |
|
foreach (var item in document.LINES)
|
230 |
|
try
|
231 |
|
{
|
232 |
|
FlowMarkModeling(item);
|
233 |
|
}
|
234 |
|
catch (Exception ex)
|
235 |
|
{
|
236 |
|
Log.Write("Error in FlowMarkModeling");
|
237 |
|
Log.Write("UID : " + item.UID);
|
238 |
|
Log.Write(ex.Message);
|
239 |
|
Log.Write(ex.StackTrace);
|
240 |
|
}
|
241 |
|
|
242 |
|
|
243 |
|
// Note Symbol Modeling
|
244 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Note Symbol Modeling");
|
245 |
|
foreach (var item in document.SYMBOLS)
|
246 |
|
try
|
247 |
|
{
|
248 |
|
NoteSymbolModeling(item);
|
249 |
|
}
|
250 |
|
catch (Exception ex)
|
251 |
|
{
|
252 |
|
Log.Write("Error in NoteSymbolModeling");
|
253 |
|
Log.Write("UID : " + item.UID);
|
254 |
|
Log.Write(ex.Message);
|
255 |
|
Log.Write(ex.StackTrace);
|
256 |
|
}
|
257 |
|
|
258 |
|
|
259 |
|
// Note Modeling
|
260 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Notes Modeling");
|
261 |
|
foreach (var item in document.NOTES)
|
262 |
|
try
|
263 |
|
{
|
264 |
|
NoteModeling(item);
|
265 |
|
}
|
266 |
|
catch (Exception ex)
|
267 |
|
{
|
268 |
|
Log.Write("Error in NoteModeling");
|
269 |
|
Log.Write("UID : " + item.UID);
|
270 |
|
Log.Write(ex.Message);
|
271 |
|
Log.Write(ex.StackTrace);
|
272 |
|
}
|
273 |
|
|
274 |
|
// Text Modeling
|
275 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Texts Modeling");
|
276 |
|
foreach (var item in document.TEXTINFOS)
|
277 |
|
try
|
278 |
|
{
|
279 |
|
TextModeling(item);
|
280 |
|
}
|
281 |
|
catch (Exception ex)
|
282 |
|
{
|
283 |
|
Log.Write("Error in TextModeling");
|
284 |
|
Log.Write("UID : " + item.UID);
|
285 |
|
Log.Write(ex.Message);
|
286 |
|
Log.Write(ex.StackTrace);
|
287 |
|
}
|
288 |
|
|
289 |
|
// Input LineNumber Attribute
|
290 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute");
|
291 |
|
foreach (var item in document.LINENUMBERS)
|
292 |
|
try
|
293 |
|
{
|
294 |
|
InputLineNumberAttribute(item);
|
295 |
|
}
|
296 |
|
catch (Exception ex)
|
|
138 |
#region Clear Nominal Diameter
|
|
139 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Clear Attribute");
|
|
140 |
SetSystemEditingCommand(false);
|
|
141 |
foreach (var item in radApp.ActiveDocument.ActiveSheet.Symbols)
|
|
142 |
{
|
|
143 |
string modelItemID = string.Empty;
|
|
144 |
foreach (var attributes in item.AttributeSets)
|
297 |
145 |
{
|
298 |
|
Log.Write("Error in InputLineNumberAttribute");
|
299 |
|
Log.Write("UID : " + item.UID);
|
300 |
|
Log.Write(ex.Message);
|
301 |
|
Log.Write(ex.StackTrace);
|
302 |
|
}
|
|
146 |
if (!string.IsNullOrEmpty(modelItemID))
|
|
147 |
break;
|
303 |
148 |
|
304 |
|
// Input Symbol Attribute
|
305 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
|
306 |
|
foreach (var item in document.SYMBOLS)
|
307 |
|
try
|
308 |
|
{
|
309 |
|
InputSymbolAttribute(item, item.ATTRIBUTES);
|
310 |
|
}
|
311 |
|
catch (Exception ex)
|
312 |
|
{
|
313 |
|
Log.Write("Error in InputSymbolAttribute");
|
314 |
|
Log.Write("UID : " + item.UID);
|
315 |
|
Log.Write(ex.Message);
|
316 |
|
Log.Write(ex.StackTrace);
|
|
149 |
foreach (var attribute in attributes)
|
|
150 |
{
|
|
151 |
if (attribute.Name == "ModelID")
|
|
152 |
{
|
|
153 |
modelItemID = attribute.GetValue().ToString();
|
|
154 |
break;
|
|
155 |
}
|
|
156 |
}
|
317 |
157 |
}
|
318 |
158 |
|
319 |
|
// Input SpecBreak Attribute
|
320 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
|
321 |
|
foreach (var item in document.SpecBreaks)
|
322 |
|
try
|
|
159 |
if (!string.IsNullOrEmpty(modelItemID))
|
323 |
160 |
{
|
324 |
|
InputSpecBreakAttribute(item);
|
|
161 |
LMModelItem modelItem = dataSource.GetModelItem(modelItemID);
|
|
162 |
if (modelItem != null)
|
|
163 |
{
|
|
164 |
LMAAttribute attribute = modelItem.Attributes["NominalDiameter"];
|
|
165 |
if (attribute != null)
|
|
166 |
attribute.set_Value(DBNull.Value);
|
|
167 |
attribute = modelItem.Attributes["PipingPoint1.NominalDiameter"];
|
|
168 |
if (attribute != null)
|
|
169 |
attribute.set_Value(DBNull.Value);
|
|
170 |
attribute = modelItem.Attributes["PipingPoint2.NominalDiameter"];
|
|
171 |
if (attribute != null)
|
|
172 |
attribute.set_Value(DBNull.Value);
|
|
173 |
|
|
174 |
modelItem.Commit();
|
|
175 |
ReleaseCOMObjects(modelItem);
|
|
176 |
}
|
325 |
177 |
}
|
326 |
|
catch (Exception ex)
|
|
178 |
}
|
|
179 |
foreach (var item in radApp.ActiveDocument.ActiveSheet.AllDependencyObjects)
|
|
180 |
{
|
|
181 |
string modelItemID = string.Empty;
|
|
182 |
foreach (var attributes in item.AttributeSets)
|
327 |
183 |
{
|
328 |
|
Log.Write("Error in InputSpecBreakAttribute");
|
329 |
|
Log.Write("UID : " + item.UID);
|
330 |
|
Log.Write(ex.Message);
|
331 |
|
Log.Write(ex.StackTrace);
|
332 |
|
}
|
|
184 |
if (!string.IsNullOrEmpty(modelItemID))
|
|
185 |
break;
|
333 |
186 |
|
334 |
|
// Label Symbol Modeling
|
335 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Labels Modeling");
|
336 |
|
foreach (var item in document.SYMBOLS)
|
337 |
|
try
|
338 |
|
{
|
339 |
|
LabelSymbolModeling(item);
|
340 |
|
}
|
341 |
|
catch (Exception ex)
|
342 |
|
{
|
343 |
|
Log.Write("Error in LabelSymbolModeling");
|
344 |
|
Log.Write("UID : " + item.UID);
|
345 |
|
Log.Write(ex.Message);
|
346 |
|
Log.Write(ex.StackTrace);
|
|
187 |
foreach (var attribute in attributes)
|
|
188 |
{
|
|
189 |
if (attribute.Name == "ModelID")
|
|
190 |
{
|
|
191 |
modelItemID = attribute.GetValue().ToString();
|
|
192 |
break;
|
|
193 |
}
|
|
194 |
}
|
347 |
195 |
}
|
348 |
196 |
|
349 |
|
// LineRun Line Join
|
350 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns");
|
351 |
|
foreach (LineNumber lineNumber in document.LINENUMBERS)
|
352 |
|
try
|
353 |
|
{
|
354 |
|
foreach (LineRun run in lineNumber.RUNS)
|
355 |
|
JoinRunLine(run);
|
356 |
|
}
|
357 |
|
catch (Exception ex)
|
|
197 |
if (!string.IsNullOrEmpty(modelItemID))
|
358 |
198 |
{
|
359 |
|
Log.Write("Error in JoinRunLine");
|
360 |
|
Log.Write("UID : " + lineNumber.UID);
|
361 |
|
Log.Write(ex.Message);
|
362 |
|
Log.Write(ex.StackTrace);
|
363 |
|
}
|
|
199 |
LMModelItem modelItem = dataSource.GetModelItem(modelItemID);
|
|
200 |
if (modelItem != null)
|
|
201 |
{
|
|
202 |
LMAAttribute attribute = modelItem.Attributes["NominalDiameter"];
|
|
203 |
if (attribute != null)
|
|
204 |
attribute.set_Value(DBNull.Value);
|
364 |
205 |
|
365 |
|
// TrimLineRun Line Join
|
366 |
|
foreach (TrimLine trimLine in document.TRIMLINES)
|
367 |
|
try
|
368 |
|
{
|
369 |
|
foreach (LineRun run in trimLine.RUNS)
|
370 |
|
JoinRunLine(run);
|
371 |
|
}
|
372 |
|
catch (Exception ex)
|
373 |
|
{
|
374 |
|
Log.Write("Error in JoinRunLine");
|
375 |
|
Log.Write("UID : " + trimLine.UID);
|
376 |
|
Log.Write(ex.Message);
|
377 |
|
Log.Write(ex.StackTrace);
|
|
206 |
modelItem.Commit();
|
|
207 |
ReleaseCOMObjects(modelItem);
|
|
208 |
}
|
378 |
209 |
}
|
379 |
|
|
380 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, AllCount);
|
|
210 |
}
|
|
211 |
SetSystemEditingCommand(true);
|
|
212 |
#endregion
|
|
213 |
|
|
214 |
//// EndBreak Modeling
|
|
215 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "EndBreaks Modeling");
|
|
216 |
//foreach (var item in document.EndBreaks)
|
|
217 |
// try
|
|
218 |
// {
|
|
219 |
// EndBreakModeling(item);
|
|
220 |
// }
|
|
221 |
// catch (Exception ex)
|
|
222 |
// {
|
|
223 |
// Log.Write("Error in EndBreakModeling");
|
|
224 |
// Log.Write("UID : " + item.UID);
|
|
225 |
// Log.Write(ex.Message);
|
|
226 |
// Log.Write(ex.StackTrace);
|
|
227 |
// }
|
|
228 |
|
|
229 |
|
|
230 |
//// SpecBreak Modeling
|
|
231 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "SpecBreaks Modeling");
|
|
232 |
//foreach (var item in document.SpecBreaks)
|
|
233 |
// try
|
|
234 |
// {
|
|
235 |
// SpecBreakModeling(item);
|
|
236 |
// }
|
|
237 |
// catch (Exception ex)
|
|
238 |
// {
|
|
239 |
// Log.Write("Error in SpecBreakModeling");
|
|
240 |
// Log.Write("UID : " + item.UID);
|
|
241 |
// Log.Write(ex.Message);
|
|
242 |
// Log.Write(ex.StackTrace);
|
|
243 |
// }
|
|
244 |
|
|
245 |
|
|
246 |
//// LineNumber Modeling
|
|
247 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "LineNumbers Modeling");
|
|
248 |
//foreach (var item in document.LINENUMBERS)
|
|
249 |
// try
|
|
250 |
// {
|
|
251 |
// LineNumberModeling(item);
|
|
252 |
// }
|
|
253 |
// catch (Exception ex)
|
|
254 |
// {
|
|
255 |
// Log.Write("Error in LineNumberModeling");
|
|
256 |
// Log.Write("UID : " + item.UID);
|
|
257 |
// Log.Write(ex.Message);
|
|
258 |
// Log.Write(ex.StackTrace);
|
|
259 |
// }
|
|
260 |
|
|
261 |
|
|
262 |
//// FlowMark Modeling
|
|
263 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Flow Mark Modeling");
|
|
264 |
//foreach (var item in document.LINES)
|
|
265 |
// try
|
|
266 |
// {
|
|
267 |
// FlowMarkModeling(item);
|
|
268 |
// }
|
|
269 |
// catch (Exception ex)
|
|
270 |
// {
|
|
271 |
// Log.Write("Error in FlowMarkModeling");
|
|
272 |
// Log.Write("UID : " + item.UID);
|
|
273 |
// Log.Write(ex.Message);
|
|
274 |
// Log.Write(ex.StackTrace);
|
|
275 |
// }
|
|
276 |
|
|
277 |
|
|
278 |
//// Note Symbol Modeling
|
|
279 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Note Symbol Modeling");
|
|
280 |
//foreach (var item in document.SYMBOLS)
|
|
281 |
// try
|
|
282 |
// {
|
|
283 |
// NoteSymbolModeling(item);
|
|
284 |
// }
|
|
285 |
// catch (Exception ex)
|
|
286 |
// {
|
|
287 |
// Log.Write("Error in NoteSymbolModeling");
|
|
288 |
// Log.Write("UID : " + item.UID);
|
|
289 |
// Log.Write(ex.Message);
|
|
290 |
// Log.Write(ex.StackTrace);
|
|
291 |
// }
|
|
292 |
|
|
293 |
|
|
294 |
//// Note Modeling
|
|
295 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Notes Modeling");
|
|
296 |
//foreach (var item in document.NOTES)
|
|
297 |
// try
|
|
298 |
// {
|
|
299 |
// NoteModeling(item);
|
|
300 |
// }
|
|
301 |
// catch (Exception ex)
|
|
302 |
// {
|
|
303 |
// Log.Write("Error in NoteModeling");
|
|
304 |
// Log.Write("UID : " + item.UID);
|
|
305 |
// Log.Write(ex.Message);
|
|
306 |
// Log.Write(ex.StackTrace);
|
|
307 |
// }
|
|
308 |
|
|
309 |
//// Text Modeling
|
|
310 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Texts Modeling");
|
|
311 |
//foreach (var item in document.TEXTINFOS)
|
|
312 |
// try
|
|
313 |
// {
|
|
314 |
// TextModeling(item);
|
|
315 |
// }
|
|
316 |
// catch (Exception ex)
|
|
317 |
// {
|
|
318 |
// Log.Write("Error in TextModeling");
|
|
319 |
// Log.Write("UID : " + item.UID);
|
|
320 |
// Log.Write(ex.Message);
|
|
321 |
// Log.Write(ex.StackTrace);
|
|
322 |
// }
|
|
323 |
|
|
324 |
//// Input LineNumber Attribute
|
|
325 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute");
|
|
326 |
//foreach (var item in document.LINENUMBERS)
|
|
327 |
// try
|
|
328 |
// {
|
|
329 |
// InputLineNumberAttribute(item);
|
|
330 |
// }
|
|
331 |
// catch (Exception ex)
|
|
332 |
// {
|
|
333 |
// Log.Write("Error in InputLineNumberAttribute");
|
|
334 |
// Log.Write("UID : " + item.UID);
|
|
335 |
// Log.Write(ex.Message);
|
|
336 |
// Log.Write(ex.StackTrace);
|
|
337 |
// }
|
|
338 |
|
|
339 |
//// Input Symbol Attribute
|
|
340 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
|
|
341 |
//foreach (var item in document.SYMBOLS)
|
|
342 |
// try
|
|
343 |
// {
|
|
344 |
// InputSymbolAttribute(item, item.ATTRIBUTES);
|
|
345 |
// }
|
|
346 |
// catch (Exception ex)
|
|
347 |
// {
|
|
348 |
// Log.Write("Error in InputSymbolAttribute");
|
|
349 |
// Log.Write("UID : " + item.UID);
|
|
350 |
// Log.Write(ex.Message);
|
|
351 |
// Log.Write(ex.StackTrace);
|
|
352 |
// }
|
|
353 |
|
|
354 |
//// Input SpecBreak Attribute
|
|
355 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set Symbols Attribute");
|
|
356 |
//foreach (var item in document.SpecBreaks)
|
|
357 |
// try
|
|
358 |
// {
|
|
359 |
// InputSpecBreakAttribute(item);
|
|
360 |
// }
|
|
361 |
// catch (Exception ex)
|
|
362 |
// {
|
|
363 |
// Log.Write("Error in InputSpecBreakAttribute");
|
|
364 |
// Log.Write("UID : " + item.UID);
|
|
365 |
// Log.Write(ex.Message);
|
|
366 |
// Log.Write(ex.StackTrace);
|
|
367 |
// }
|
|
368 |
|
|
369 |
//// Label Symbol Modeling
|
|
370 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Labels Modeling");
|
|
371 |
//foreach (var item in document.SYMBOLS)
|
|
372 |
// try
|
|
373 |
// {
|
|
374 |
// LabelSymbolModeling(item);
|
|
375 |
// }
|
|
376 |
// catch (Exception ex)
|
|
377 |
// {
|
|
378 |
// Log.Write("Error in LabelSymbolModeling");
|
|
379 |
// Log.Write("UID : " + item.UID);
|
|
380 |
// Log.Write(ex.Message);
|
|
381 |
// Log.Write(ex.StackTrace);
|
|
382 |
// }
|
|
383 |
|
|
384 |
//// LineRun Line Join
|
|
385 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Join LineRuns");
|
|
386 |
//foreach (LineNumber lineNumber in document.LINENUMBERS)
|
|
387 |
// try
|
|
388 |
// {
|
|
389 |
// foreach (LineRun run in lineNumber.RUNS)
|
|
390 |
// JoinRunLine(run);
|
|
391 |
// }
|
|
392 |
// catch (Exception ex)
|
|
393 |
// {
|
|
394 |
// Log.Write("Error in JoinRunLine");
|
|
395 |
// Log.Write("UID : " + lineNumber.UID);
|
|
396 |
// Log.Write(ex.Message);
|
|
397 |
// Log.Write(ex.StackTrace);
|
|
398 |
// }
|
|
399 |
|
|
400 |
//// TrimLineRun Line Join
|
|
401 |
//foreach (TrimLine trimLine in document.TRIMLINES)
|
|
402 |
// try
|
|
403 |
// {
|
|
404 |
// foreach (LineRun run in trimLine.RUNS)
|
|
405 |
// JoinRunLine(run);
|
|
406 |
// }
|
|
407 |
// catch (Exception ex)
|
|
408 |
// {
|
|
409 |
// Log.Write("Error in JoinRunLine");
|
|
410 |
// Log.Write("UID : " + trimLine.UID);
|
|
411 |
// Log.Write(ex.Message);
|
|
412 |
// Log.Write(ex.StackTrace);
|
|
413 |
// }
|
|
414 |
|
|
415 |
//SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, AllCount);
|
381 |
416 |
}
|
382 |
417 |
}
|
383 |
418 |
catch (Exception ex)
|
... | ... | |
585 |
620 |
|
586 |
621 |
ReleaseCOMObjects(_LMSymbol);
|
587 |
622 |
}
|
588 |
|
|
589 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
590 |
623 |
}
|
591 |
624 |
|
592 |
625 |
private void RemoveSymbol(Symbol symbol)
|
... | ... | |
954 |
987 |
ReleaseCOMObjects(item.Key);
|
955 |
988 |
}
|
956 |
989 |
}
|
957 |
|
|
958 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
959 |
990 |
}
|
960 |
991 |
|
961 |
992 |
/// <summary>
|
... | ... | |
1027 |
1058 |
}
|
1028 |
1059 |
|
1029 |
1060 |
ReleaseCOMObjects(_LMSymbol);
|
1030 |
|
|
1031 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
1032 |
1061 |
}
|
1033 |
1062 |
|
1034 |
1063 |
/// <summary>
|
... | ... | |
1809 |
1838 |
Array array = new double[] { 0, endBreak.SPPID.ORIGINAL_X, endBreak.SPPID.ORIGINAL_Y };
|
1810 |
1839 |
LMLabelPersist _LmLabelPersist = _placement.PIDPlaceLabel(endBreak.SPPID.MAPPINGNAME, ref array, Rotation: 0, LabeledItem: targetLMConnector.AsLMRepresentation(), IsLeaderVisible: true);
|
1811 |
1840 |
}
|
1812 |
|
|
1813 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
1814 |
1841 |
}
|
1815 |
1842 |
|
1816 |
1843 |
private LMConnector ReModelingLMConnector(LMConnector connector)
|
... | ... | |
2183 |
2210 |
Line line = item as Line;
|
2184 |
2211 |
AutoJoinPipeRun(line.SPPID.ModelItemId);
|
2185 |
2212 |
modelItemId = line.SPPID.ModelItemId;
|
2186 |
|
|
2187 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
2188 |
2213 |
}
|
2189 |
2214 |
}
|
2190 |
2215 |
}
|
... | ... | |
2557 |
2582 |
}
|
2558 |
2583 |
}
|
2559 |
2584 |
}
|
2560 |
|
|
2561 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
2562 |
2585 |
}
|
2563 |
2586 |
|
2564 |
2587 |
/// <summary>
|
... | ... | |
2773 |
2796 |
}
|
2774 |
2797 |
}
|
2775 |
2798 |
}
|
2776 |
|
|
2777 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
2778 |
2799 |
}
|
2779 |
2800 |
|
2780 |
2801 |
/// <summary>
|
... | ... | |
2813 |
2834 |
ReleaseCOMObjects(_LMModelItem);
|
2814 |
2835 |
ReleaseCOMObjects(_LMSymbol);
|
2815 |
2836 |
}
|
2816 |
|
|
2817 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
2818 |
2837 |
}
|
2819 |
2838 |
|
2820 |
2839 |
/// <summary>
|
... | ... | |
3115 |
3134 |
}
|
3116 |
3135 |
if (_LMSymbol != null)
|
3117 |
3136 |
ReleaseCOMObjects(_LMSymbol);
|
3118 |
|
|
3119 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
3120 |
3137 |
}
|
3121 |
3138 |
|
3122 |
3139 |
/// <summary>
|
... | ... | |
3151 |
3168 |
ReleaseCOMObjects(_LMItemNote);
|
3152 |
3169 |
if (_LMSymbol != null)
|
3153 |
3170 |
ReleaseCOMObjects(_LMSymbol);
|
3154 |
|
|
3155 |
|
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetProgress, ++CurrentCount);
|
3156 |
3171 |
}
|
3157 |
3172 |
|
3158 |
3173 |
/// <summary>
|