개정판 82d6e5ea
dev issue #1174 : line join 개선
Change-Id: I0eb300acd88e8aebad30f7e3069ee622b320dff6
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
619 | 619 |
{ |
620 | 620 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetAllProgress, document.LINENUMBERS.Count); |
621 | 621 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.SetStep, "Set LineNumbers Attribute"); |
622 |
List<string> endLine = new List<string>(); |
|
622 | 623 |
foreach (var item in document.LINENUMBERS) |
623 | 624 |
try |
624 | 625 |
{ |
625 |
InputLineNumberAttribute(item); |
|
626 |
InputLineNumberAttribute(item, endLine);
|
|
626 | 627 |
SplashScreenManager.Default.SendCommand(SPPIDSplashScreen.SplashScreenCommand.UpProgress, null); |
627 | 628 |
} |
628 | 629 |
catch (Exception ex) |
... | ... | |
2585 | 2586 |
ReleaseCOMObjects(connector); |
2586 | 2587 |
} |
2587 | 2588 |
|
2588 |
modelItemIDs = modelItemIDs.Distinct().ToList(); |
|
2589 | 2589 |
|
2590 |
return modelItemIDs; |
|
2590 |
List<string> result = new List<string>(); |
|
2591 |
modelItemIDs = modelItemIDs.Distinct().ToList(); |
|
2592 |
string originalName = GetSPPIDFileName(modelId); |
|
2593 |
foreach (var item in modelItemIDs) |
|
2594 |
{ |
|
2595 |
string fileName = GetSPPIDFileName(item); |
|
2596 |
if (originalName == fileName) |
|
2597 |
result.Add(item); |
|
2598 |
else |
|
2599 |
{ |
|
2600 |
LMConnector connector = GetLMConnectorOnlyOne(item); |
|
2601 |
if (connector != null && Convert.ToBoolean(connector.get_IsZeroLength())) |
|
2602 |
{ |
|
2603 |
result.Add(item); |
|
2604 |
ReleaseCOMObjects(connector); |
|
2605 |
} |
|
2606 |
} |
|
2607 |
} |
|
2608 |
|
|
2609 |
return result; |
|
2591 | 2610 |
} |
2592 | 2611 |
|
2593 | 2612 |
/// <summary> |
... | ... | |
3058 | 3077 |
/// Line Number 기준으로 모든 Item에 Line Number의 Attribute Input |
3059 | 3078 |
/// </summary> |
3060 | 3079 |
/// <param name="lineNumber"></param> |
3061 |
private void InputLineNumberAttribute(LineNumber lineNumber) |
|
3080 |
private void InputLineNumberAttribute(LineNumber lineNumber, List<string> endLine)
|
|
3062 | 3081 |
{ |
3063 | 3082 |
foreach (LineRun run in lineNumber.RUNS) |
3064 | 3083 |
{ |
... | ... | |
3100 | 3119 |
else if (item.GetType() == typeof(Line)) |
3101 | 3120 |
{ |
3102 | 3121 |
Line line = item as Line; |
3103 |
if (line != null) |
|
3122 |
if (line != null && !endLine.Contains(line.SPPID.ModelItemId))
|
|
3104 | 3123 |
{ |
3105 | 3124 |
LMModelItem _LMModelItem = dataSource.GetModelItem(line.SPPID.ModelItemId); |
3106 | 3125 |
if (_LMModelItem != null && _LMModelItem.get_ItemStatus() == "Active") |
... | ... | |
3125 | 3144 |
} |
3126 | 3145 |
if (_LMModelItem != null) |
3127 | 3146 |
ReleaseCOMObjects(_LMModelItem); |
3147 |
endLine.Add(line.SPPID.ModelItemId); |
|
3128 | 3148 |
} |
3129 | 3149 |
} |
3130 | 3150 |
} |
... | ... | |
3853 | 3873 |
return symbolPath; |
3854 | 3874 |
} |
3855 | 3875 |
|
3876 |
private string GetSPPIDFileName(string modelItemId) |
|
3877 |
{ |
|
3878 |
LMModelItem modelItem = dataSource.GetModelItem(modelItemId); |
|
3879 |
string symbolPath = null; |
|
3880 |
foreach (LMRepresentation rep in modelItem.Representations) |
|
3881 |
{ |
|
3882 |
if (!DBNull.Value.Equals(rep.get_FileName()) && !string.IsNullOrEmpty(rep.get_FileName())) |
|
3883 |
{ |
|
3884 |
symbolPath = rep.get_FileName(); |
|
3885 |
break; |
|
3886 |
} |
|
3887 |
} |
|
3888 |
ReleaseCOMObjects(modelItem); |
|
3889 |
return symbolPath; |
|
3890 |
} |
|
3891 |
|
|
3856 | 3892 |
/// <summary> |
3857 | 3893 |
/// Graphic OID로 해당 Symbol의 크기를 구하여 Zoom |
3858 | 3894 |
/// </summary> |
내보내기 Unified diff