개정판 16fb3441
dev issue #000 : att
Change-Id: I6c540405b5553a7152b55b2e0a355440c160112b
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
4621 | 4621 |
{ |
4622 | 4622 |
foreach (var item in run.RUNITEMS) |
4623 | 4623 |
{ |
4624 |
if (item.GetType() == typeof(Symbol)) |
|
4625 |
{ |
|
4626 |
Symbol symbol = item as Symbol; |
|
4627 |
LMSymbol _LMSymbol = dataSource.GetSymbol(symbol.SPPID.RepresentationId); |
|
4628 |
if (_LMSymbol != null) |
|
4629 |
{ |
|
4630 |
LMModelItem _LMModelItem = _LMSymbol.ModelItemObject; |
|
4631 | ||
4632 |
if (_LMModelItem != null && _LMModelItem.get_ItemStatus() == "Active") |
|
4633 |
{ |
|
4634 |
foreach (var attribute in lineNumber.ATTRIBUTES) |
|
4635 |
{ |
|
4636 |
LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID); |
|
4637 |
if (mapping != null && !string.IsNullOrEmpty(attribute.VALUE) && attribute.VALUE != "None") |
|
4638 |
{ |
|
4639 |
LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME]; |
|
4640 |
if (mapping.SPPIDATTRIBUTENAME.Equals("NominalDiameter") && !string.IsNullOrEmpty(attribute.VALUE) && _LMAAttribute != null) |
|
4641 |
{ |
|
4642 |
DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", attribute.VALUE)); |
|
4643 | ||
4644 |
if (rows.Length.Equals(1)) |
|
4645 |
{ |
|
4646 |
if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric")) |
|
4647 |
attribute.VALUE = rows[0]["MetricStr"].ToString(); |
|
4648 |
else |
|
4649 |
attribute.VALUE = rows[0]["InchStr"].ToString(); |
|
4650 | ||
4651 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
4652 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
4653 |
else if (_LMAAttribute.get_Value() != attribute.VALUE) |
|
4654 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
4655 |
} |
|
4656 |
} |
|
4657 |
else if (_LMAAttribute != null) |
|
4658 |
{ |
|
4659 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
4660 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
4661 |
else if (_LMAAttribute.get_Value() != attribute.VALUE) |
|
4662 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
4663 |
} |
|
4664 |
} |
|
4665 |
} |
|
4666 |
_LMModelItem.Commit(); |
|
4667 |
} |
|
4668 |
if (_LMModelItem != null) |
|
4669 |
ReleaseCOMObjects(_LMModelItem); |
|
4670 |
} |
|
4671 |
if (_LMSymbol != null) |
|
4672 |
ReleaseCOMObjects(_LMSymbol); |
|
4673 |
} |
|
4674 |
else if (item.GetType() == typeof(Line)) |
|
4624 |
if (item.GetType() == typeof(Line)) |
|
4675 | 4625 |
{ |
4676 | 4626 |
Line line = item as Line; |
4677 | 4627 |
if (line != null && !endLine.Contains(line.SPPID.ModelItemId)) |
... | ... | |
4767 | 4717 |
if (!string.IsNullOrEmpty(sRep)) |
4768 | 4718 |
{ |
4769 | 4719 |
LMSymbol _LMSymbol = dataSource.GetSymbol(sRep); |
4770 |
LMModelItem _LMModelItem = _LMSymbol.ModelItemObject; |
|
4771 |
LMAAttributes _Attributes = _LMModelItem.Attributes; |
|
4720 |
LMAAttributes _Attributes = _LMSymbol.Attributes; |
|
4772 | 4721 |
|
4773 | 4722 |
foreach (var item in targetAttributes) |
4774 | 4723 |
{ |
... | ... | |
4811 | 4760 |
DefaultTextModeling(item.VALUE, _LMSymbol.get_XCoordinate(), _LMSymbol.get_YCoordinate()); |
4812 | 4761 |
} |
4813 | 4762 |
} |
4814 |
_LMModelItem.Commit();
|
|
4763 |
_LMSymbol.Commit();
|
|
4815 | 4764 | |
4816 | 4765 |
ReleaseCOMObjects(_Attributes); |
4817 |
ReleaseCOMObjects(_LMModelItem); |
|
4818 | 4766 |
ReleaseCOMObjects(_LMSymbol); |
4819 | 4767 |
} |
4820 | 4768 |
else if (!string.IsNullOrEmpty(sModelID)) |
DTI_PID/SPPIDConverter/ConverterDocking.resx | ||
---|---|---|
185 | 185 |
</value> |
186 | 186 |
</data> |
187 | 187 |
<metadata name="defaultLookAndFeel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
188 |
<value>190, 17</value>
|
|
188 |
<value>17, 56</value>
|
|
189 | 189 |
</metadata> |
190 | 190 |
</root> |
내보내기 Unified diff