프로젝트

일반

사용자정보

개정판 ce45fb25

IDce45fb2546004f5d155b494f8411e134b6015578
상위 da5e5085
하위 f23488ca

조봉훈이(가) 일년 이상 전에 추가함

Set to change TypicalMode for Find function (temporary code until the right code is found)

Change-Id: I35419821ffb7646c3d0f30c45a180be5793299dd

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
43 43
        dynamic newDrawing;
44 44
        dynamic application;
45 45
        bool closeDocument;
46
        bool passTypicalMode;
46 47
        Ingr.RAD2D.Application radApp;
47 48
        SPPID_Document document;
48 49
        ETCSetting _ETCSetting;
......
197 198
            }
198 199
            finally
199 200
            {
201
                if (!passTypicalMode)
202
                {
203
                    string dummyRepID = string.Empty;
204
                    string dummyModelItemId = string.Empty;
205
                    LMSymbol lMSymbol = _placement.PIDPlaceSymbol(@"\Piping\Fittings\Flanges and Unions\Flange.sym", 0, 0);
206
                    if (lMSymbol != null)
207
                    {
208
                        lMSymbol.Commit();
209
                        dummyRepID = lMSymbol.AsLMRepresentation().Id;
210

  
211
                        _LMAItem lMAItem = _placement.PIDCreateItem(@"\Piping\Routing\Process Lines\Secondary Piping.sym");
212
                        PlaceRunInputs placeRunInputs = new PlaceRunInputs();
213
                        placeRunInputs.AddSymbolTarget(lMSymbol, 0, 0);
214
                        placeRunInputs.AddPoint(-1, -1);
215
                        LMConnector conn = _placement.PIDPlaceRun(lMAItem, placeRunInputs);
216
                        if (conn != null)
217
                        {
218
                            conn.Commit();
219
                            dummyModelItemId = conn.ModelItemID;
220
                        }
221
                        ReleaseCOMObjects(lMSymbol);
222
                        ReleaseCOMObjects(conn);
223
                    }
224

  
225
                    if (!string.IsNullOrWhiteSpace(dummyRepID))
226
                    {
227
                        lMSymbol = dataSource.GetSymbol(dummyRepID);
228
                        if (lMSymbol != null)
229
                        {
230
                            _placement.PIDRemovePlacement(lMSymbol.AsLMRepresentation());
231
                            lMSymbol.Commit();
232
                            ReleaseCOMObjects(lMSymbol);
233
                        }
234
                    }
235
                    if (!string.IsNullOrWhiteSpace(dummyModelItemId))
236
                    {
237
                        LMModelItem modelItem = dataSource.GetModelItem(dummyModelItemId);
238
                        if (modelItem != null)
239
                        {
240
                            foreach (LMRepresentation rep in modelItem.Representations)
241
                            {
242
                                if (rep.Attributes["RepresentationType"].get_Value() == "Connector" && rep.Attributes["ItemStatus"].get_Value() == "Active")
243
                                    _placement.PIDRemovePlacement(rep);
244
                            }
245
                            ReleaseCOMObjects(modelItem);
246
                        }
247
                    }
248
                }
249

  
200 250
                radApp.Interactive = true;
201 251

  
202 252
                Project_DB.InsertDrawingInfoAndOPCInfo(document.PATH, drawingNumber, drawingName, document);
......
495 545
                                        }
496 546
                                    }
497 547

  
498
                                    // 제거
548
                                    // 제거                                    
499 549
                                    RemoveSymbol(connSymbol);
500 550
                                    RemoveLine(item);
551
                                    passTypicalMode = true;
501 552

  
502 553
                                    // 재생성
503 554
                                    SymbolModelingBySymbol(connSymbol);

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)