개정판 61878df9
dev issue #000 : 임시
Change-Id: I38b0eda63b7ae1c16f654fc25f324695a8039960
DTI_PID/SPPIDConverter/AutoModeling.cs | ||
---|---|---|
44 | 44 |
Ingr.RAD2D.Application radApp; |
45 | 45 |
SPPID_Document document; |
46 | 46 |
ETCSetting _ETCSetting; |
47 |
DataTable nominalDiameterTable = null; |
|
47 |
//DataTable nominalDiameterTable = null;
|
|
48 | 48 |
public string DocumentLabelText { get; set; } |
49 | 49 |
|
50 | 50 |
List<Line> BranchLines = new List<Line>(); |
... | ... | |
90 | 90 |
string drawingName = document.DrawingName; |
91 | 91 |
try |
92 | 92 |
{ |
93 |
nominalDiameterTable = Project_DB.SelectProjectNominalDiameter(); |
|
93 |
//nominalDiameterTable = Project_DB.SelectProjectNominalDiameter();
|
|
94 | 94 |
_placement = new Placement(); |
95 | 95 |
dataSource = _placement.PIDDataSource; |
96 | 96 |
|
... | ... | |
182 | 182 |
{ |
183 | 183 |
newDrawing.Save(); |
184 | 184 |
newDrawing.CloseDrawing(true); |
185 |
ReleaseCOMObjects(newDrawing); |
|
185 |
ReleaseCOMObjects(newDrawing);
|
|
186 | 186 |
newDrawing = null; |
187 | 187 |
} |
188 | 188 |
else if (newDrawing == null) |
... | ... | |
4663 | 4663 |
} |
4664 | 4664 |
else if (mapping.SPPIDATTRIBUTENAME.Equals("NominalDiameter") && !string.IsNullOrEmpty(attribute.VALUE) && _LMAAttribute != null) |
4665 | 4665 |
{ |
4666 |
DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", attribute.VALUE)); |
|
4667 |
|
|
4668 |
if (rows.Length.Equals(1)) |
|
4669 |
{ |
|
4670 |
if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric")) |
|
4671 |
attribute.VALUE = rows[0]["MetricStr"].ToString(); |
|
4672 |
else |
|
4673 |
attribute.VALUE = rows[0]["InchStr"].ToString(); |
|
4674 |
|
|
4675 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
4676 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
4677 |
else if (_LMAAttribute.get_Value() != attribute.VALUE) |
|
4678 |
_LMAAttribute.set_Value(attribute.VALUE); |
|
4679 |
} |
|
4666 |
//DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", attribute.VALUE));
|
|
4667 |
|
|
4668 |
//if (rows.Length.Equals(1))
|
|
4669 |
//{
|
|
4670 |
// if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric"))
|
|
4671 |
// attribute.VALUE = rows[0]["MetricStr"].ToString();
|
|
4672 |
// else
|
|
4673 |
// attribute.VALUE = rows[0]["InchStr"].ToString();
|
|
4674 |
|
|
4675 |
// if (DBNull.Value.Equals(_LMAAttribute.get_Value()))
|
|
4676 |
// _LMAAttribute.set_Value(attribute.VALUE);
|
|
4677 |
// else if (_LMAAttribute.get_Value() != attribute.VALUE)
|
|
4678 |
// _LMAAttribute.set_Value(attribute.VALUE);
|
|
4679 |
//}
|
|
4680 | 4680 |
} |
4681 | 4681 |
else if (_LMAAttribute != null) |
4682 | 4682 |
{ |
... | ... | |
4730 | 4730 |
LMAAttribute _LMAAttribute = _Attributes[mapping.SPPIDATTRIBUTENAME]; |
4731 | 4731 |
if (mapping.SPPIDATTRIBUTENAME.Equals("NominalDiameter") && !string.IsNullOrEmpty(item.VALUE) && _LMAAttribute != null) |
4732 | 4732 |
{ |
4733 |
DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", item.VALUE)); |
|
4734 |
|
|
4735 |
if (rows.Length.Equals(1)) |
|
4736 |
{ |
|
4737 |
if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric")) |
|
4738 |
item.VALUE = rows[0]["MetricStr"].ToString(); |
|
4739 |
else |
|
4740 |
item.VALUE = rows[0]["InchStr"].ToString(); |
|
4741 |
|
|
4742 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
4743 |
_LMAAttribute.set_Value(item.VALUE); |
|
4744 |
else if (_LMAAttribute.get_Value() != item.VALUE) |
|
4745 |
_LMAAttribute.set_Value(item.VALUE); |
|
4746 |
} |
|
4733 |
//DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", item.VALUE));
|
|
4734 |
|
|
4735 |
//if (rows.Length.Equals(1))
|
|
4736 |
//{
|
|
4737 |
// if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric"))
|
|
4738 |
// item.VALUE = rows[0]["MetricStr"].ToString();
|
|
4739 |
// else
|
|
4740 |
// item.VALUE = rows[0]["InchStr"].ToString();
|
|
4741 |
|
|
4742 |
// if (DBNull.Value.Equals(_LMAAttribute.get_Value()))
|
|
4743 |
// _LMAAttribute.set_Value(item.VALUE);
|
|
4744 |
// else if (_LMAAttribute.get_Value() != item.VALUE)
|
|
4745 |
// _LMAAttribute.set_Value(item.VALUE);
|
|
4746 |
//}
|
|
4747 | 4747 |
} |
4748 | 4748 |
else if (_LMAAttribute != null) |
4749 | 4749 |
{ |
... | ... | |
4807 | 4807 |
} |
4808 | 4808 |
else if (mapping.SPPIDATTRIBUTENAME.Equals("NominalDiameter") && !string.IsNullOrEmpty(item.VALUE) && _LMAAttribute != null) |
4809 | 4809 |
{ |
4810 |
DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", item.VALUE)); |
|
4811 |
|
|
4812 |
if (rows.Length.Equals(1)) |
|
4813 |
{ |
|
4814 |
if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric")) |
|
4815 |
item.VALUE = rows[0]["MetricStr"].ToString(); |
|
4816 |
else |
|
4817 |
item.VALUE = rows[0]["InchStr"].ToString(); |
|
4818 |
|
|
4819 |
if (DBNull.Value.Equals(_LMAAttribute.get_Value())) |
|
4820 |
_LMAAttribute.set_Value(item.VALUE); |
|
4821 |
else if (_LMAAttribute.get_Value() != item.VALUE) |
|
4822 |
_LMAAttribute.set_Value(item.VALUE); |
|
4823 |
} |
|
4810 |
//DataRow[] rows = nominalDiameterTable.Select(string.Format("MetricStr = '{0}' OR InchStr = '{0}'", item.VALUE));
|
|
4811 |
|
|
4812 |
//if (rows.Length.Equals(1))
|
|
4813 |
//{
|
|
4814 |
// if (_ETCSetting.UnitSetting != null && _ETCSetting.UnitSetting.Equals("Metric"))
|
|
4815 |
// item.VALUE = rows[0]["MetricStr"].ToString();
|
|
4816 |
// else
|
|
4817 |
// item.VALUE = rows[0]["InchStr"].ToString();
|
|
4818 |
|
|
4819 |
// if (DBNull.Value.Equals(_LMAAttribute.get_Value()))
|
|
4820 |
// _LMAAttribute.set_Value(item.VALUE);
|
|
4821 |
// else if (_LMAAttribute.get_Value() != item.VALUE)
|
|
4822 |
// _LMAAttribute.set_Value(item.VALUE);
|
|
4823 |
//}
|
|
4824 | 4824 |
} |
4825 | 4825 |
else if (mapping != null && !string.IsNullOrEmpty(item.VALUE) && item.VALUE != "None") |
4826 | 4826 |
{ |
내보내기 Unified diff