ARIS Community - We Love BPM

List of pictures and tables

hreidemeister's picture
by Holger Reidemeister in Reports & Macros posted on 2017-09-07

Hello community,

in my report into a Word document I need lists of all chapters, pictures and tables in the document with the page number.

The list of chapters (= table of content) I get with the property “Constants.FMT_TOCENTRY#” and “Constants.FIELD_TOC”. That works fine in my report.

But how can I create a list of pictures and a list of tables in a similar way?

I would be very happy if anyone can help me.

Many thanks and greetings

Holger

1472 Views
0 Likes
6 Comments
Sorry there are no tags
There are no attachments
Robert Goldenbaum posted on 2017-09-08

Hi Holger,

as far as I know, this is not possible directly from ARIS. I would be happy if anybody can prove me wrong :-)

I have tried to circumvent this problem by having a second word document with only the picture field in it. I use then an extrended output object and insert the picture field document whenever I output a picture. But the problem with this is that the resulting document then has a linefeed at the end of the document once per entered picture field document. So this can lead to multiple empty pages at the end...

BR Robert

Martin Schröder posted on 2017-09-12

Hello Holger,

maybe this can help to create a Word index of images and tables:

cf. help page Constants > ArisFormatType
( /abs/help/en/script/ba/index.htm#report_CONSTANTS_ArisFormatType.htm )

Constants.FMT_INDEXENTRY 
Constant for DefineF, TableCell, Output
Create an index entry for this text. An index entry can be used to create a directory of all index entries at another location using the Constants.FMT_INDEXLIST within an output instruction.

Regards, Martin

Robert Goldenbaum posted on 2017-09-13

Hi Martin,

yes, this works a little bit, but only for an Index. So if you need two tables (one for figures and one for tables), this will not really help...

But well, better than nothing :-)

Regards,

Robert

Holger Reidemeister posted on 2017-09-14

Hello Robert, hello Martin,

many thanks for your ideas. :-)

I'll try to use "Constants.FMT_INDEXENTRY" and hope, that this is sufficient for the customers need.

Regards

Holger

Holger Reidemeister posted on 2017-10-06

Hello @ all,

now I've integrated a table of pictures with FMT_INDEXENTRY and FMT_INDEXLIST and that works. But some details at the result is strange:

1) In the table of content I've got te lines in the format [<Chapter No.> <Tab> > <Chapter name> ....... <Page No.>]. So the page numbers are clearly arranged at the right margin.

In the table of pictures the format is [<Picture No.> <Picture name>, <Page No.>]. So the page numbers are at the end of the text in the line. And the text haves several lengths.

2) Everywhere in my document I use the font "Calibri". The default font size 11. The label of the pictures are in the font size 9. But in my table of pictures the font is "Times New Roman" and the font size is 12.

I print out the table of pictures with the following lines:

var _Font = "Calibri";
var nFontSize  =   11;

oOutput.BeginSection(true, Constants.SECTION_INDEX);
oOutput = writeText(oOutput, _Head, "Abbildungsverzeichnis"+LFD);
oOutput.Output("", _Font, nFontSize, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT | Constants.FMT_INDEXLIST, 0);
oOutput.EndSection();

3) My picture label, printed under the picture, is [Picture <No.> : <Picture name>]. At the pictures it is OK, but in the list of pictures the colon changes to a line break. For every picture I have 2 lines in the list. Without the colon in the label it is OK.

4) The list of pictures is not sorted by the page numbers, but by the text. If I have less then 10 pictures it's fine. Otherwise I would expect:

Pic No.: 1 ...
Pic No.: 2 ...
...
Pic No.: 9 ...
Pic No.: 10 ...
Pic No.: 11 ...
etc.

But I get:

Pic No.: 1 ...
Pic No.: 10 ...
Pic No.: 11 ...
Pic No.: 2 ...
etc.

OK, I could take formatted numbers with pre-zeros. Bat this does not look very fine.

Now I would be very happy if anyone can help me fixing at least one of this problems.

Regards Holger

Robert Goldenbaum posted on 2017-10-06

Hi Holger,

you have to format the index entries in the word template document...

And concerning the sorting - just add a 0 for the 1 (01, 02, 03...)

Regards,

Robert