프로젝트

일반

사용자정보

개정판 154d8f43

ID154d8f43aebc83a10debd29d4dde8deae0f977ed
상위 3d7ff99c
하위 b7a29053

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #498 : OPC 연결 기본 로직 완료

Change-Id: I0150a1f6234dafa298e7bf2a405d290f84ad93a5

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
105 105
                    RunSpecBreakModeling();
106 106
                    // Join SameConnector
107 107
                    RunJoinRunForSameConnector();
108
                    // Check FlowDirection
109
                    RunFlowDirection();
110 108
                    // Join Run
111 109
                    RunJoinRun();
110
                    // Check FlowDirection
111
                    RunFlowDirection();
112 112
                    //Line Number Modeling
113 113
                    RunLineNumberModeling();
114 114
                    // Note Modeling
......
140 140
            }
141 141
            finally
142 142
            {
143
                Project_DB.InsertDrawingInfo(document.PATH, drawingNumber, drawingName, document);
143
                Project_DB.InsertDrawingInfoAndOPCInfo(document.PATH, drawingNumber, drawingName, document);
144 144
                if (SplashScreenManager.Default != null && SplashScreenManager.Default.IsSplashFormVisible)
145 145
                {
146 146
                    SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.ClearParent, null);
......
515 515
                        SetFlowDirectionByLine(line.SPPID.ModelItemId);
516 516

  
517 517
                        ReleaseCOMObjects(modelItem);
518
                        modelItem = null;
518 519
                    }
519 520
                }
520 521

  
......
533 534
                SetFlowDirectionByLine(modelId);
534 535

  
535 536
                ReleaseCOMObjects(zeroLengthModelItem);
537
                zeroLengthModelItem = null;
538

  
536 539
                SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.UpProgress, null);
537 540
            }
538 541
            foreach (var modelId in ZeroLengthModelItemIDReverse)
......
548 551
                SetFlowDirectionByLine(modelId);
549 552

  
550 553
                ReleaseCOMObjects(zeroLengthModelItem);
554
                zeroLengthModelItem = null;
555

  
551 556
                SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.UpProgress, null);
552 557
            }
553 558
            foreach (var modelId in ZeroLengthSymbolToSymbolModelItemID)
......
581 586
                        }
582 587
                    }
583 588
                    ReleaseCOMObjects(modelItem);
589
                    modelItem = null;
584 590
                }
585 591

  
586 592
                void SetSymbolFlowDirectionByRelationShip(LMRelationship relationship, LMConnector connector, string sFlowDirection)
......
597 603

  
598 604
                        symbolModelItem.Commit();
599 605
                        ReleaseCOMObjects(symbolModelItem);
606
                        symbolModelItem = null;
600 607
                    }
601 608
                    // Item1이 Symbol
602 609
                    else if (!DBNull.Value.Equals(relationship.Item2RepresentationID) && relationship.Item2RepresentationID == connector.Id &&
......
610 617

  
611 618
                        symbolModelItem.Commit();
612 619
                        ReleaseCOMObjects(symbolModelItem);
620
                        symbolModelItem = null;
613 621
                    }
614 622
                }
615 623

  
......
2800 2808
            List<string> result = new List<string>();
2801 2809
            modelItemIDs = modelItemIDs.Distinct().ToList();
2802 2810
            string originalName = GetSPPIDFileName(modelId);
2811
            bool existZeroLength = false;
2803 2812
            foreach (var item in modelItemIDs)
2804 2813
            {
2805 2814
                string fileName = GetSPPIDFileName(item);
......
2808 2817
                else
2809 2818
                {
2810 2819
                    LMConnector connector = GetLMConnectorOnlyOne(item);
2811
                    if (connector != null && Convert.ToBoolean(connector.get_IsZeroLength()))
2820
                    if (connector != null && Convert.ToBoolean(connector.get_IsZeroLength()) && connector.LabelPersists.Count == 0)
2812 2821
                    {
2813 2822
                        result.Add(item);
2814 2823
                        ReleaseCOMObjects(connector);
2824
                        existZeroLength = true;
2815 2825
                    }
2816 2826
                }
2817 2827
            }
2828

  
2829
            if (result.Count == 1 && existZeroLength)
2830
            {
2831
                LMConnector connector = GetLMConnectorOnlyOne(result[0]);
2832
                LMConnector newConnector = ReModelingLMConnector(connector, originalName);
2833
                result.Clear();
2834
                if (newConnector != null)
2835
                    result.Add(newConnector.ModelItemID);
2836

  
2837
                ReleaseCOMObjects(connector);
2838
                connector = null;
2839
                ReleaseCOMObjects(newConnector);
2840
                newConnector = null;
2841
            }
2818 2842
            
2819 2843
            return result;
2820 2844
        }

내보내기 Unified diff

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