logic to save word sections with resolved RO values for exporting the approved procedure
logic to print an unlinked RO graphic(ex Tif) when used in a figure substep
This commit is contained in:
@@ -3274,15 +3274,23 @@ namespace Volian.Print.Library
|
||||
ROFSTLookup lookup = rofst.GetROFSTLookup(dvi);
|
||||
string linkInfoText = itemInfo.MyContent.Text.Replace(@"\v ", "");
|
||||
Match m = Regex.Match(linkInfoText, @"(.*)[#]Link:([A-Za-z]*):(.*)");
|
||||
string val = null;
|
||||
if (m.Groups.Count < 4)
|
||||
{
|
||||
erMsg = "RO was not found during data migration.";
|
||||
//erMsg = "RO was not found during data migration.";
|
||||
// added newlines in the RO number (shown in figure substep type with figure RO)
|
||||
// if we are here, then there is no RO link information, use this number to find the RO image to print
|
||||
val = string.Format("{0}\n{1}\n{2}\n{3}",
|
||||
linkInfoText.Substring(0, linkInfoText.Length - 16),
|
||||
linkInfoText.Substring(linkInfoText.Length - 16, 8),
|
||||
linkInfoText.Substring(linkInfoText.Length - 8, 4),
|
||||
linkInfoText.Substring(linkInfoText.Length - 4, 4));
|
||||
val = val.Replace(@"\u8209?", "-");
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] subs = m.Groups[3].Value.Split(" ".ToCharArray());
|
||||
string roid = subs[1];
|
||||
string val = lookup.GetRoValue(subs[1]);
|
||||
val = lookup.GetRoValue(subs[1]);
|
||||
if (val == null || val == "?") val = lookup.GetRoValue(subs[1].Substring(0, 12));
|
||||
if (val == "?")
|
||||
{
|
||||
@@ -3290,7 +3298,9 @@ namespace Volian.Print.Library
|
||||
_MyLog.WarnFormat("\r\nMissing Referenced Object {0} in {1}", subs[1], itemInfo.ShortPath);
|
||||
yoff += 2 * SixLinesPerInch;
|
||||
}
|
||||
else if (val != null && val != "?")
|
||||
}
|
||||
GC.Collect(); // memory garbage collection (Regex memory bug)
|
||||
if (val != null && val != "?")
|
||||
{
|
||||
string[] vals = val.Split("\n".ToCharArray());
|
||||
Width = Int32.Parse(vals[3], System.Globalization.NumberStyles.AllowHexSpecifier) * MyItemInfo.FormatStepData.Font.CharsToTwips;
|
||||
@@ -3300,10 +3310,10 @@ namespace Volian.Print.Library
|
||||
// for between HLS & figure.
|
||||
float h1 = lines * SixLinesPerInch;
|
||||
float h2 = RoughSizeOfPage - MyParent.Height - SixLinesPerInch;
|
||||
Height = Math.Min(h1,h2);
|
||||
Height = Math.Min(h1, h2);
|
||||
if (h1 > h2)
|
||||
{
|
||||
Width *= (h2/h1);
|
||||
Width *= (h2 / h1);
|
||||
}
|
||||
//yForCheckoff = yoff + Height - SixLinesPerInch;
|
||||
yoff = AdjustLocIfLongerRNO(itemInfo, yoff, yoffRightParent);
|
||||
@@ -3319,7 +3329,7 @@ namespace Volian.Print.Library
|
||||
ImageText = val;
|
||||
else
|
||||
{
|
||||
roImage = rofst.GetROImageByFilename(vals[0],MyItemInfo);// need code to go and get an ROImaage if it exists
|
||||
roImage = rofst.GetROImageByFilename(vals[0], MyItemInfo);// need code to go and get an ROImaage if it exists
|
||||
if (roImage == null)
|
||||
erMsg = string.Format("Image {0} does not exist.", vals[0]);
|
||||
else
|
||||
@@ -3332,7 +3342,6 @@ namespace Volian.Print.Library
|
||||
erMsg = string.Format("Image {0} does not exist, error = {1}.", vals[0], ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (erMsg != null) Rtf = GetRtf(erMsg, itemInfo.ActiveFormat.PlantFormat.FormatData.Font);
|
||||
CalculateXOffsetGridOrFigure(itemInfo, maxRNO, formatInfo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user