Section

AddPicture

Description

Adds a picture to the body of a section.

Syntax

bOK = sn:AddPicture(item, iCategory[, sCaption[, ind]])

Parameters

item
Item pointer: must point to a Media Object record, or to a link to a Media Object record
iCategory
Integer: Picture category.  Value must be in the range 1 to 5.  The default labels for these categories in the Pictures tab of the Report Options dialog, are as follows: 1 = Individual, 2 = Spouse Family, 3 = Spouse, 4 = Child, 5 = Other.  However, all 5 categories can be used in whatever way a report plugin needs to use them, and by setting an appropriate value for the "picture_categories" value in the FH_Requirements function, a report can arrange for the category labels, in the Picture tab of Report Options, to be re-labelled appropriately.
sCaption
Text string or nil: Optional.  Defaults to nil if not supplied.  Only supply a caption if you do not want a caption to be generated automatically (which it will be if sCaption is nil).
ind
Item pointer: Optional.  If it points to an Individual record, this is the Individual that will be used for age calculations when generating the caption.  Is ignored if a caption is supplied.

Return Value

bOK

Remarks

Example
bOK = sn.AddPicture(pitem, 1, nil, ind)