프로젝트

일반

사용자정보

개정판 48fd75e2

ID48fd75e2eec2d423615fc2980d6d957d7eb67689
상위 cc6e888a
하위 82d6e5ea

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

dev issue #1174 : repair join, attribute

Change-Id: I31ffb6f0a45d1c3b53403abcd344f1ee7929f725

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
2567 2567
        private List<string> FindOtherModelItemBySymbolWhereTypePipeRun(LMSymbol symbol, string modelId)
2568 2568
        {
2569 2569
            List<string> modelItemIDs = new List<string>();
2570
            foreach (LMConnector connector in symbol.Connect1Connectors)
2570
            foreach (LMConnector connector in symbol.Avoid1Connectors)
2571 2571
            {
2572 2572
                LMModelItem modelItem = connector.ModelItemObject;
2573 2573
                if (modelItem.get_ItemStatus() == "Active" && modelItem.get_ItemTypeName().ToString() == "PipeRun" && modelItem.Id != modelId)
......
2576 2576
                ReleaseCOMObjects(connector);
2577 2577
            }
2578 2578

  
2579
            foreach (LMConnector connector in symbol.Connect2Connectors)
2579
            foreach (LMConnector connector in symbol.Avoid2Connectors)
2580 2580
            {
2581 2581
                LMModelItem modelItem = connector.ModelItemObject;
2582 2582
                if (modelItem.get_ItemStatus() == "Active" && modelItem.get_ItemTypeName().ToString() == "PipeRun" && modelItem.Id != modelId)
......
2585 2585
                ReleaseCOMObjects(connector);
2586 2586
            }
2587 2587

  
2588
            modelItemIDs = modelItemIDs.Distinct().ToList();
2589

  
2588 2590
            return modelItemIDs;
2589 2591
        }
2590 2592

  
......
3062 3064
            {
3063 3065
                foreach (var item in run.RUNITEMS)
3064 3066
                {
3065
                    //if (item.GetType() == typeof(Symbol))
3066
                    //{
3067
                    //    Symbol symbol = item as Symbol;
3068
                    //    LMSymbol _LMSymbol = dataSource.GetSymbol(symbol.SPPID.RepresentationId);
3069
                    //    if (_LMSymbol != null)
3070
                    //    {
3071
                    //        LMModelItem _LMModelItem = _LMSymbol.ModelItemObject;
3072

  
3073
                    //        if (_LMModelItem != null && _LMModelItem.get_ItemStatus() == "Active")
3074
                    //        {
3075
                    //            foreach (var attribute in lineNumber.ATTRIBUTES)
3076
                    //            {
3077
                    //                LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID);
3078
                    //                if (mapping != null && !string.IsNullOrEmpty(attribute.VALUE) && attribute.VALUE != "None")
3079
                    //                {
3080
                    //                    LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME];
3081
                    //                    if (_LMAAttribute != null)
3082
                    //                    {
3083
                    //                        if (DBNull.Value.Equals(_LMAAttribute.get_Value()))
3084
                    //                            _LMAAttribute.set_Value(attribute.VALUE);
3085
                    //                        else if (_LMAAttribute.get_Value() != attribute.VALUE)
3086
                    //                            _LMAAttribute.set_Value(attribute.VALUE);
3087
                    //                    }
3088
                    //                }
3089
                    //            }
3090
                    //            _LMModelItem.Commit();
3091
                    //        }
3092
                    //        if (_LMModelItem != null)
3093
                    //            ReleaseCOMObjects(_LMModelItem);
3094
                    //    }
3095
                    //    if (_LMSymbol != null)
3096
                    //        ReleaseCOMObjects(_LMSymbol);
3097
                    //}
3098
                    //else
3099
                    if (item.GetType() == typeof(Line))
3067
                    if (item.GetType() == typeof(Symbol))
3068
                    {
3069
                        Symbol symbol = item as Symbol;
3070
                        LMSymbol _LMSymbol = dataSource.GetSymbol(symbol.SPPID.RepresentationId);
3071
                        if (_LMSymbol != null)
3072
                        {
3073
                            LMModelItem _LMModelItem = _LMSymbol.ModelItemObject;
3074

  
3075
                            if (_LMModelItem != null && _LMModelItem.get_ItemStatus() == "Active")
3076
                            {
3077
                                foreach (var attribute in lineNumber.ATTRIBUTES)
3078
                                {
3079
                                    LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID);
3080
                                    if (mapping != null && !string.IsNullOrEmpty(attribute.VALUE) && attribute.VALUE != "None")
3081
                                    {
3082
                                        LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME];
3083
                                        if (_LMAAttribute != null)
3084
                                        {
3085
                                            if (DBNull.Value.Equals(_LMAAttribute.get_Value()))
3086
                                                _LMAAttribute.set_Value(attribute.VALUE);
3087
                                            else if (_LMAAttribute.get_Value() != attribute.VALUE)
3088
                                                _LMAAttribute.set_Value(attribute.VALUE);
3089
                                        }
3090
                                    }
3091
                                }
3092
                                _LMModelItem.Commit();
3093
                            }
3094
                            if (_LMModelItem != null)
3095
                                ReleaseCOMObjects(_LMModelItem);
3096
                        }
3097
                        if (_LMSymbol != null)
3098
                            ReleaseCOMObjects(_LMSymbol);
3099
                    }
3100
                    else if (item.GetType() == typeof(Line))
3100 3101
                    {
3101 3102
                        Line line = item as Line;
3102 3103
                        if (line != null)
......
3124 3125
                            }
3125 3126
                            if (_LMModelItem != null)
3126 3127
                                ReleaseCOMObjects(_LMModelItem);
3127

  
3128
                            break;
3129 3128
                        }
3130 3129
                    }
3131 3130
                }

내보내기 Unified diff

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