Fixes Index out of range when a Referenced Object is missing from the RO.FST. This will output an error message since it reflects an error in the plant data.
This commit is contained in:
parent
c68412fd81
commit
08bbb82714
@ -2758,8 +2758,14 @@ namespace Volian.Print.Library
|
|||||||
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
||||||
string roid = subs[1];
|
string roid = subs[1];
|
||||||
string val = lookup.GetRoValue(subs[1]);
|
string val = lookup.GetRoValue(subs[1]);
|
||||||
if (val == null) val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
if (val == null || val == "?") val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
||||||
if (val != null)
|
if (val == "?")
|
||||||
|
{
|
||||||
|
erMsg = string.Format("Referenced Object does not exist.");
|
||||||
|
_MyLog.WarnFormat("Missing Referenced Object {0} in {1}", subs[1], itemInfo.ShortPath);
|
||||||
|
yoff += 2 * SixLinesPerInch;
|
||||||
|
}
|
||||||
|
else if (val != null && val != "?")
|
||||||
{
|
{
|
||||||
string[] vals = val.Split("\n".ToCharArray());
|
string[] vals = val.Split("\n".ToCharArray());
|
||||||
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user