General InformationThis opening ID is invoked when the attribute entered in the sheet properties is modified.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleNote:
In the following example, the opening ID is defined to place a stamp symbol every time key words like France, Diffusion or NonProtege are found in the Description box of a sheet.
//Notify All Available Symbol Names
let InputSymbols(list)
set InputSymbols = Parameters.GetAttributeObject("Symbol_Names_In")
let symbolName(String)
for symbolName inside InputSymbols
{
Notify(symbolName)
}
//Declare the output Lists
let OutputSymbols(list)
let OutputSymbolsPosX(list)
let OutputSymbolsPosY(list)
let OutputSymbolsRotation(list)
let OutputSymbolsFlip(list)
let OutputSymbolsScale(list)
//Get The Sheet Properties and monitored attribute/attributes
let sSheetDescr(String)
set sSheetDescr = ThisObject.GetAttributeString("V_description")
let sheetWidth(Real)
let sheetHeight(Real)
sheetWidth = ThisObject.V_DIFFormatWidth
sheetHeight = ThisObject.V_DIFFormatHeight
//Keyword Found indicators
let France(Real)
let Diffusion(Real)
let Reserve(real)
let NonProtege(Real)
let Conf(Real)
let PropIntel(Real)
//Keyword search process
France = sSheetDescr.Search("France")
Diffusion = sSheetDescr.Search("Diffusion")
Reserve = sSheetDescr.Search("Reserve")
NonProtege = sSheetDescr.Search("NonProtege")
Conf = sSheetDescr.Search("Conf")
PropIntel = sSheetDescr.Search("PropIntel")
if(France >= 0)
{
//Output symbol called StampingSymbolFrance is used twice for 2 instances
OutputSymbols.Append("StampingSymbolFrance")
OutputSymbolsPosX.Append((sheetWidth/2) -25)
OutputSymbolsPosY.Append(10)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
OutputSymbols.Append("StampingSymbolFrance")
OutputSymbolsPosX.Append((sheetWidth/2) +50)
OutputSymbolsPosY.Append(sheetHeight - 20)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
}
if(Diffusion >= 0)
{
OutputSymbols.Append("StampingSymbolDiffusion")
OutputSymbolsPosX.Append((sheetWidth/2) -25)
OutputSymbolsPosY.Append(sheetHeight - 20)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
}
if(Reserve >= 0)
{
OutputSymbols.Append("StampingSymbolReserve")
OutputSymbolsPosX.Append((sheetWidth/2)-100)
OutputSymbolsPosY.Append(sheetHeight - 20)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
}
if(NonProtege >= 0)
{
OutputSymbols.Append("StampingSymbolNonProtege")
OutputSymbolsPosX.Append((sheetWidth/2) -25)
OutputSymbolsPosY.Append(10)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
}
if(Conf >= 0)
{
OutputSymbols.Append("StampingSymbolConf")
OutputSymbolsPosX.Append((sheetWidth/2)-100)
OutputSymbolsPosY.Append(sheetHeight - 20)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
}
if(PropIntel >= 0)
{
OutputSymbols.Append("StampingSymbolPropIntel")
OutputSymbolsPosX.Append(sheetWidth -90)
OutputSymbolsPosY.Append(10)
OutputSymbolsRotation.Append(0)
OutputSymbolsFlip.Append(FALSE)
OutputSymbolsScale.Append(1)
}
//Set the outputs for the BR
Parameters.SetAttributeObject("Symbol_Names_Out", OutputSymbols)
Parameters.SetAttributeObject("Symbol_PositionX", OutputSymbolsPosX)
Parameters.SetAttributeObject("Symbol_PositionY", OutputSymbolsPosY)
Parameters.SetAttributeObject("Symbol_RotationAngle", OutputSymbolsRotation)
Parameters.SetAttributeObject("Is_Flip", OutputSymbolsFlip)
Parameters.SetAttributeObject("Symbol_Scale", OutputSymbolsScale)
| |||||||||||||||||||||||||||||||||||||||||||||||