개정판 4b4dbca9
dev issue #000 : child Symbol Modeling
Change-Id: I26536f33fec33160b1efaf92f4fc5b45ccd48f9b
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
309 | 309 |
_LMSymbol.Commit(); |
310 | 310 |
symbol.SPPID.RepresentationId = _LMSymbol.AsLMRepresentation().Id; |
311 | 311 |
|
312 |
//foreach (var item in symbol.ChildSymbols)
|
|
313 |
// CreateChildSymbol(item, _LMSymbol, x, y);
|
|
312 |
foreach (var item in symbol.ChildSymbols) |
|
313 |
CreateChildSymbol(item, _LMSymbol);
|
|
314 | 314 |
} |
315 | 315 |
|
316 | 316 |
ReleaseCOMObjects(_LMSymbol); |
317 | 317 |
} |
318 | 318 |
|
319 |
private void CreateChildSymbol(ChildSymbol childSymbol, LMSymbol parentSymbol, double x, double y)
|
|
319 |
private void CreateChildSymbol(ChildSymbol childSymbol, LMSymbol parentSymbol) |
|
320 | 320 |
{ |
321 |
LMSymbol _LMSymbol = _placement.PIDPlaceSymbol(childSymbol.SPPID.MAPPINGNAME, x, y, TargetItem: parentSymbol); |
|
322 |
foreach (var item in childSymbol.ChildSymbols) |
|
323 |
CreateChildSymbol(item, _LMSymbol, x, y); |
|
321 |
Ingr.RAD2D.Symbol2d symbol2d = radApp.ActiveDocument.ActiveSheet.DrawingObjects[parentSymbol.get_GraphicOID().ToString()]; |
|
322 |
double x1 = 0; |
|
323 |
double x2 = 0; |
|
324 |
double y1 = 0; |
|
325 |
double y2 = 0; |
|
326 |
symbol2d.Range(out x1, out y1, out x2, out y2); |
|
327 |
|
|
328 |
LMSymbol _LMSymbol = _placement.PIDPlaceSymbol(childSymbol.SPPID.MAPPINGNAME, (x1 + x2) / 2, (y1 + y2) / 2, TargetItem: parentSymbol); |
|
329 |
if (_LMSymbol != null) |
|
330 |
{ |
|
331 |
childSymbol.SPPID.RepresentationId = _LMSymbol.AsLMRepresentation().Id; |
|
332 |
foreach (var item in childSymbol.ChildSymbols) |
|
333 |
CreateChildSymbol(item, _LMSymbol); |
|
334 |
} |
|
335 |
|
|
324 | 336 |
|
325 | 337 |
ReleaseCOMObjects(_LMSymbol); |
326 | 338 |
} |
내보내기 Unified diff