개정판 a3557cbc
dev issue #000 : fix bug
Change-Id: Id8c97062781c83372cebe5c4eccbe5fae34bd50b
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
1162 | 1162 |
if (item.GetType() == typeof(Line)) |
1163 | 1163 |
{ |
1164 | 1164 |
Line line = item as Line; |
1165 |
|
|
1166 |
LMModelItem _LMModelItem = dataSource.GetModelItem(line.SPPID.ModelItemId);//dataSource.GetPipeRun(line.SPPID.ModelItemId); |
|
1167 |
foreach (var attribute in lineNumber.ATTRIBUTES) |
|
1165 |
LMModelItem _LMModelItem = dataSource.GetModelItem(line.SPPID.ModelItemId); |
|
1166 |
if (_LMModelItem.get_ItemStatus() == "Active") |
|
1168 | 1167 |
{ |
1169 |
LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID); |
|
1170 |
if (mapping != null) |
|
1168 |
foreach (var attribute in lineNumber.ATTRIBUTES) |
|
1171 | 1169 |
{ |
1172 |
LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME];
|
|
1173 |
if (_LMAAttribute != null)
|
|
1170 |
LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID);
|
|
1171 |
if (mapping != null)
|
|
1174 | 1172 |
{ |
1175 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
1176 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
1177 |
else if (_LMAAttribute.get_Value() != attribute.VALUE) |
|
1178 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
1173 |
LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME]; |
|
1174 |
if (_LMAAttribute != null) |
|
1175 |
{ |
|
1176 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
1177 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
1178 |
else if (_LMAAttribute.get_Value() != attribute.VALUE) |
|
1179 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
1180 |
} |
|
1179 | 1181 |
} |
1180 | 1182 |
} |
1183 |
_LMModelItem.Commit(); |
|
1184 |
break; |
|
1181 | 1185 |
} |
1182 |
|
|
1183 |
_LMModelItem.Commit(); |
|
1184 | 1186 |
ReleaseCOMObjects(_LMModelItem); |
1185 |
break; |
|
1186 | 1187 |
} |
1187 | 1188 |
} |
1188 | 1189 |
} |
내보내기 Unified diff