Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I need some help from the experts. I have a List of Figures and I need to be able to auto generate each figure title with the sheet numbers. It needs to look something like this:
Figure 1 Engineering (Sheet 1 of 2)
Figure 1 Engineering (Sheet 2 of 2)
Everything is working correctly except for the total sheet count. It is counting the maximum number of sheets and putting that as the total sheet count for each figure. Example:
Figure 1 Engineering (Sheet 1 of 3)
Figure 1 Engineering (Sheet 2 of 3)
Figure2 Engineering Symbols (Sheet 1 of 3)
Figure2 Engineering Symbols (Sheet 2 of 3)
Figure2 Engineering Symbols (Sheet3 of 3)
I have the following FOSI code:
<counter initial="1" style="arabic" enumid="totalsheet.ctr">
<stringdecl textid="totalsht.txt" status="1">
<e-i-c gi="figure">
<reset resetlist="totalsheet.ctr">
</e-i-c>
<e-i-c gi="sheet" occur="first">
<charlist inherit="0"><enumerat enumid="totalsheet.ctr"></charlist>
</e-i-c>
<e-i-c gi="sheet" occur="all">
<charlist inherit="0"><enumerat enumid="totalsheet.ctr"></charlist>
</e-i-c>
<e-i-c gi="sheet" occur="last">
<charlist inherit="0"><enumerat enumid="totalsheet.ctr">
<savetext textid="totalsht.txt" conrule="totalsheet.ctr" placemnt="after"></charlist>
</e-i-c>
****SAVETEXT FOR THE LIST OF FIGURES*******
<e-i-c gi="graphic" context="subfig" *=" figure"=" occur="all">
<savetext textid="figurecol1.app" conrule="chapnum.txt,\-\,subfig.ctr,\.\,figtitle.txt,\" (sheet=" \,shtnbr.ctr,\=" of=" \,totalsht.txt,\)\,dotfill,chapnum.txt,\-\,bodyfolio.txt[bo]"=" placemnt="before" append="1">
</e-i-c>
I apologize for the lengthy post. Any help would be greatly appreciated.
Sarah
I was having this same issue and both Brendan's and Suzanne's solutions worked for me.This is something I should have figured out on my own, but I was stuck on saving the toc.app in the first occurrence of subfig instead of the last.
<figure>
<subfig><graphic></subfig>
<subfig><graphic></subfig>
<subfig><graphic></subfig>...etc
</figure>
The TOC required only the first subfig like so:
Blah Blah Assembly (Sheet 1 of X).
I hard-coded the "Sheet 1 of" since that was all I needed (although you have to follow Suzanne's advice and save the page number in the first occurrence.)
In the last occurrence of subfig in figure (fig-title.txt is saved in title in figure):
<savetext textid="subfigct.txt" conrule="sheetct"/">
<savetext textid="toc.app" conrule="fig-title.txt,\" (sheet=" 1=" of=" \,subfigct.txt[bo],\)\,dot.fill,chapstr.txt[bo],\-\,folio-toc.txt"<=" p=">
append="1"/>
I had tried using a second .tiv scoped to the document to save sheetct for the toc and that didn't work, so I agree with Sarah that a .tiv in a .tiv confuses the formatter.