You are on page 1of 1

Sample EKL script to read the design table and specify the view action.

The script is to color the SDD plate based on the values provided in the design
table which is set in resourcetable.KnowledgeResources|SLDPLATECOLORINGSHEET. Let
RowNum(Integer)

Let DTSheetType1 (DTSheetType)


Let SLDPlateT(SldPlate)
Let SLDPanel1(Feature)
Let RefCategory(Feature)
Let R(String)
Let G(String)
Let B(String)
Let ColVal(string)

Set SLDPlateT = Input


if(SLDPlateT <> NULL)
{
SLDPanel1= SLDPlateT.Owner
RefCategory = SLDPanel1.Owner

DTSheetType1 = CreateSheet("KnowledgeResources|SLDPLATECOLORINGSHEET")

RowNum = DTSheetType1.LocateInColumn(1,RefCategory.Name)
if(RowNum > 0)
{
Result = True
ColVal = DTSheetType1.CellAsString(RowNum,5)
if(ColVal == "grey")
ActionList.Append("AreaFill(Coloring=150,150,150)")
else
{
if(ColVal == "color")
{
R = DTSheetType1.CellAsString(RowNum,2)
G = DTSheetType1.CellAsString(RowNum,3)
B = DTSheetType1.CellAsString(RowNum,4)
ActionList.Append("AreaFill(Coloring="+R+","+G+","+B+")")
}
}
}
}

You might also like