This function allows you to define a parameter that can take only one of the values listed in a list box.

syntaxSyntax:
FWiz.DefineListBox(name, value, inputTitle, inputImage, name1, value1, name2, value2, ...)

Parameters

Parameter Description
name A string with the parameter name.
value The parameter value.
inputTitle The title of the parameter input box.
inputImage The index of the image to be displayed when the focus switches to the parameter input box.
name Title of the value given in the list box.
value Value reported in the list box.

Return Value

If an error occurs it returns false otherwise it returns true.

Remarks

The parameter value can be read using the GetValue function.

This function can only be called in the initialization phase within the function in response to the OnInitialize event.

Example

See the TO-220 sample code for the complete script.

  Copy codeCopy code
function OnInitialize()
{
  FWiz.DefineImage("to220.png");
  FWiz.DefineAttributes("Q", "Type");
  FWiz.DefineTabs("Dimension", 1, "Assembly", 1, "Pad Style", 1, "3D Model", 1, "Info", 1);
  FWiz.DefineDimensionRange("A", 4.40, 4.60, "Body Thickness (A)");
  FWiz.DefineDimensionRange("b", 0.61, 0.88, "Lead Width (b)");
  FWiz.DefineDimensionRange("b1", 1.15, 1.70, "Lead Width (b1)");
  FWiz.DefineDimensionRange("c", 0.49, 0.70, "Lead Thickness (c)");
  FWiz.DefineDimensionRange("D", 15.25, 15.75, "Body Length (D)");
  FWiz.DefineDimensionRange("E", 10.00, 10.40, "Device Width (E)");
  FWiz.DefineDimensionRange("e", 2.40, 2.70, "Lead Spacing (e)");
  FWiz.DefineDimensionRange("F", 1.23, 1.32, "Tab Thickness (F)");
  FWiz.DefineDimensionRange("H1", 6.20, 6.60, "Tab Length (H1)");
  FWiz.DefineDimensionRange("J1", 2.40, 2.72, "Body Offset (J1)");
  FWiz.DefineDimensionRange("L", 13.0, 14.0, "Lead Length (L)");
  FWiz.DefineDimensionRange("L1", 3.50, 3.93, "Lead Length (L1)");
  FWiz.DefineDimension("L20", 16.4, "Mounting Length (L20)");
  FWiz.DefineDimension("L30", 28.90, "Device Length (L30)");
  FWiz.DefineDimensionRange("P", 3.75, 3.85, "Hole Diameter (P)");
  FWiz.DefineDimensionRange("Q", 2.65, 2.95, "Hole Offset (Q)");
  FWiz.DefineBoolean("BEVELEDTAB", true, "Beveled tab");
  FWiz.DefineListBox("PADSHAPEMODE", 0, "Pad Shape", 1, "Round", 0, "Square", 1);
  FWiz.DefinePenStyle("BODYPEN", 0, "#0000000000000000812ZZZZZZZ", "Body Outline Style", 1);
  FWiz.DefinePenStyle("LEADPEN", 1, "#0000000000000000813FZZZZZZ", "Lead Outline Style", 1);
  FWiz.DefineBrushStyle("BODYBRUSH", 0, "#0000000000000000G127ZZZZZZ", "Body Fill Style", 1);
  FWiz.DefineBrushStyle("LEADBRUSH", 1, "#0000000000000000G11VZZZZZZ", "Lead Fill Style", 1);
  FWiz.DefinePadStyle("PADSTYLE", 0, "Automatic", "Pad Style", 1, true);
  FWiz.Define3DStyle("BODYMAT", 0, "#2Y3Z3EY14ATD741VMUJZPJEEFU", "Body color");
  FWiz.Define3DStyle("LEADMAT", 1, "#DUR6PFF1V3VX94R4RZ392G7HDV", "Leads color");
}

See also