프로젝트

일반

사용자정보

개정판 402ef5b1

ID402ef5b12b979eba491116e7ce37e673045e6eda
상위 77cd89d6
하위 ad8328eb

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

dev issue #000 : Symbol attribute

Change-Id: I0e34a21dfd5d11bc8f8ce227f52f4b45d32143e1

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
109 109
                }
110 110
            }
111 111
            catch (Exception ex)
112

  
112 113
            {
113 114
                System.Windows.Forms.MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
114 115
            }
......
959 960
        {
960 961
            if (!string.IsNullOrEmpty(symbol.SPPID.RepresentationId))
961 962
            {
963
                LMSymbol _LMSymbol = dataSource.GetSymbol(symbol.SPPID.RepresentationId);
964
                LMPipingComp _LMPipingComp = null;
965
                LMInstrument _LMInstrument = null;
966
                LMAAttributes _Attributes = null;
967
                if (_LMSymbol.get_FileName().Contains("Instrumentation"))
968
                {
969
                    _LMInstrument = dataSource.GetInstrument(_LMSymbol.ModelItemID);
970
                    _Attributes = _LMInstrument.Attributes;
971
                }
972
                else
973
                {
974
                    _LMPipingComp = dataSource.GetPipingComp(_LMSymbol.ModelItemID);
975
                    _Attributes = _LMPipingComp.Attributes;
976
                }
977

  
962 978
                foreach (var item in symbol.PROPERTIES)
963 979
                {
964 980
                    
......
967 983

  
968 984
                foreach (var item in symbol.ATTRIBUTES)
969 985
                {
986
                    AttributeMapping mapping = document.AttributeMappings.Find(x => x.UID == item.UID);
987
                    LMAAttribute _Attribute = _Attributes[mapping.SPPIDATTRIBUTENAME];
988
                    if (_Attribute != null)
989
                        _Attribute.set_Value(item.VALUE);
990
                }
970 991

  
992
                foreach (var item in symbol.ASSOCIATIONS)
993
                {
994
                 
995
                }
971 996

  
997
                ReleaseCOMObjects(_LMSymbol);
998
                if (_LMPipingComp != null)
999
                {
1000
                    _LMPipingComp.Commit();
1001
                    ReleaseCOMObjects(_LMPipingComp);
972 1002
                }
1003
                if (_LMInstrument != null)
1004
                {
1005
                    _LMInstrument.Commit();
1006
                    ReleaseCOMObjects(_LMInstrument);
1007
                }
1008
                    
1009

  
973 1010
            }
974 1011
        }
975 1012

  

내보내기 Unified diff

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