개정판 f9125a54
dev issue #000 : 라벨 위치 임시로 조정
Change-Id: I78014eca4178f9c2035710d976dc76f64f3828bb
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
163 | 163 |
} |
164 | 164 |
} |
165 | 165 |
} |
166 |
|
|
167 |
|
|
168 |
|
|
166 | 169 |
_LMModelItem.Commit(); |
167 | 170 |
_LMLabelPresist.Commit(); |
168 | 171 |
ReleaseCOMObjects(_TargetItem); |
... | ... | |
803 | 806 |
} |
804 | 807 |
else |
805 | 808 |
{ |
806 |
placeRunInputs.AddConnectorTarget(_BranchTargetConnector, point[0], point[1]); |
|
809 |
if (_BranchTargetConnector != null) |
|
810 |
{ |
|
811 |
placeRunInputs.AddConnectorTarget(_BranchTargetConnector, point[0], point[1]); |
|
812 |
} |
|
807 | 813 |
} |
808 | 814 |
} |
809 | 815 |
else |
... | ... | |
1150 | 1156 |
if (item.GetType() == typeof(Line)) |
1151 | 1157 |
{ |
1152 | 1158 |
Line line = item as Line; |
1153 |
LMPipeRun _LMPipeRun = dataSource.GetPipeRun(line.SPPID.ModelItemId); |
|
1159 |
|
|
1160 |
LMModelItem _LMModelItem = dataSource.GetModelItem(line.SPPID.ModelItemId);//dataSource.GetPipeRun(line.SPPID.ModelItemId); |
|
1154 | 1161 |
foreach (var attribute in lineNumber.ATTRIBUTES) |
1155 | 1162 |
{ |
1156 | 1163 |
LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID); |
1157 | 1164 |
if (mapping != null) |
1158 | 1165 |
{ |
1159 |
LMAAttribute _LMAAttribute = _LMPipeRun.Attributes[mapping.SPPIDATTRIBUTENAME];
|
|
1166 |
LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME];
|
|
1160 | 1167 |
if (_LMAAttribute != null) |
1161 | 1168 |
{ |
1162 | 1169 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
... | ... | |
1167 | 1174 |
} |
1168 | 1175 |
} |
1169 | 1176 |
|
1170 |
_LMPipeRun.Commit();
|
|
1171 |
ReleaseCOMObjects(_LMPipeRun);
|
|
1177 |
_LMModelItem.Commit();
|
|
1178 |
ReleaseCOMObjects(_LMModelItem);
|
|
1172 | 1179 |
break; |
1173 | 1180 |
} |
1174 | 1181 |
} |
... | ... | |
1273 | 1280 |
LMLabelPersist _LMLabelPersist = _placement.PIDPlaceLabel(mapping.SPPIDSYMBOLNAME, ref array, Rotation: text.ANGLE, LabeledItem: _LMSymbol.AsLMRepresentation(), IsLeaderVisible: true); |
1274 | 1281 |
if (_LMLabelPersist!=null) |
1275 | 1282 |
{ |
1276 |
// |
|
1277 |
//radApp.ActiveDocument.ActiveSheet.DrawingObjects[_LMLabelPersist.get_GraphicOID().ToString()]; |
|
1283 |
DependencyObject tt = radApp.ActiveDocument.ActiveSheet.DrawingObjects[((dynamic)_LMLabelPersist).GraphicOID]; |
|
1284 |
double x1 = 0; |
|
1285 |
double x2 = 0; |
|
1286 |
double y1 = 0; |
|
1287 |
double y2 = 0; |
|
1288 |
tt.Range(out x1, out y1, out x2, out y2); |
|
1278 | 1289 |
|
1279 | 1290 |
_LMLabelPersist.Commit(); |
1291 |
_placement.PIDRemovePlacement(_LMLabelPersist.AsLMRepresentation()); |
|
1292 |
ReleaseCOMObjects(_LMLabelPersist); |
|
1293 |
double newX = Math.Abs(x1 - x2); |
|
1294 |
double newY = Math.Abs(y1 - y2) / 2; |
|
1295 |
array = new double[] { 0, text.SPPID.ORIGINAL_X + newX, text.SPPID.ORIGINAL_Y - newY }; |
|
1296 |
_LMLabelPersist = _placement.PIDPlaceLabel(mapping.SPPIDSYMBOLNAME, ref array, Rotation: text.ANGLE, LabeledItem: _LMSymbol.AsLMRepresentation(), IsLeaderVisible: true); |
|
1297 |
_LMLabelPersist.Commit(); |
|
1280 | 1298 |
ReleaseCOMObjects(_LMLabelPersist); |
1281 | 1299 |
} |
1282 | 1300 |
} |
내보내기 Unified diff