diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index 59990a23..52713636 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -1184,7 +1184,11 @@ namespace Volian.Print.Library case "[ATTACHNUM]": plstr = plstr.Replace(token, "1"); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre) break; - + case "{ATTACHNUM1}": + case "[ATTACHNUM1]": + string numAtt = GetAttachNum1(); + plstr = plstr.Replace(token, numAtt); // used by SHESDD - but 16bit returns '1' unless has format flag 'MoveParensToToken' that was only in SCE (San Onofre) + break; case "{CHKOFFHEADING}": case "[CHKOFFHEADING]": // unfortunately, the font is not stored on the page list item if there is an active @@ -1307,6 +1311,18 @@ namespace Volian.Print.Library break; } } + + private string GetAttachNum1() + { + int cnt = 0; + SectionInfo si = MySection; + while (si != null) + { + if (si.MyContent.Type == MySection.MyContent.Type) cnt++; + si = si.MyPrevious as SectionInfo; + } + return cnt.ToString(); + } private static void AddImage(SvgGroup svgGroup, float x, float y, float w, float h, string figure) { svgGroup.Add(new SvgImage(new System.Drawing.PointF(x, y), new System.Drawing.SizeF(w, h),