개정판 306a0af9
dev issue #1124 : Rev, Title 등 Drawing Attribute
Change-Id: Ie8f03675faee4134f6360a89239767eae826e76d
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
1036 | 1036 |
LMDrawing drawing = ((dynamic)drawings).Nth(1); |
1037 | 1037 |
if (drawing != null) |
1038 | 1038 |
{ |
1039 |
using (DataTable drawingAttributeDT = Project_DB.SelectDrawingProjectAttribute()) |
|
1040 |
{ |
|
1041 |
foreach (DataRow row in drawingAttributeDT.Rows) |
|
1042 |
{ |
|
1043 |
string mappingName = DBNull.Value.Equals(row["SPPID_ATTRIBUTE"]) ? string.Empty : row["SPPID_ATTRIBUTE"].ToString(); |
|
1044 |
if (!string.IsNullOrEmpty(mappingName)) |
|
1045 |
{ |
|
1046 |
string uid = row["UID"].ToString(); |
|
1047 |
string name = row["NAME"].ToString(); |
|
1048 |
Text text = document.TEXTINFOS.Find(x => x.AREA == uid); |
|
1049 |
if (text != null) |
|
1050 |
{ |
|
1051 |
string value = text.VALUE; |
|
1052 |
LMAAttribute attribute = drawing.Attributes[mappingName]; |
|
1053 |
if (attribute != null) |
|
1054 |
attribute.set_Value(value); |
|
1055 |
ReleaseCOMObjects(attribute); |
|
1056 |
document.TEXTINFOS.Remove(text); |
|
1057 |
} |
|
1058 |
} |
|
1059 |
} |
|
1039 | 1060 |
|
1040 |
|
|
1061 |
drawingAttributeDT.Dispose(); |
|
1062 |
} |
|
1041 | 1063 |
|
1042 | 1064 |
ReleaseCOMObjects(drawing); |
1043 | 1065 |
} |
내보내기 Unified diff