Skip to content

Properties objects

Common Properties

Defining <ValueType> as CommonProperties creates input controls for the selection of format properties like pen, line and color. The return value of the parameter would be a CommonProperties object

Parameter CommonProperties

<Parameter>
    <Name>CommonProp</Name>
    <Text></Text><!--(2)!-->
    <Value></Value> <!--(1)!-->
    <ValueType>CommonProperties</ValueType>
</Parameter>
  1. Leaving this tag empty initializes the palette with CommonProperties object with the current format properties.
  2. Setting a value in this tag will result in combining the text with the default text of the property.

Hide individual control

To hide an individual control of the parameter, include the <Visible> tag and specify the control name followed by a colon : and the boolean statement. Separate the expressions for each control with | like this:

Control name

<Parameter>
    <Name>CommonProp</Name>
    <Text></Text>
    <Value></Value>
    <ValueType>CommonProperties</ValueType>
    <Visible>|CommonProp.ColorByLayer:False|CommonProp.DrawOrder:False</Visible><!--(1)!-->
</Parameter>
  1. Following key words for the control name are allowed:

    • Stroke
    • StrokeByLayer
    • Pen
    • PenByLayer
    • Color
    • ColorByLayer
    • Layer
    • DrawOrder

Warning

Using the <Enable> tag is not allowed

Example

For the complete usage see the example CommonProperties located in:

  • ...\etc\Examples\PythonParts\PaletteExamples\Properties\CommonProperties.pyp
  • ...\etc\PythonPartsExampleScripts\PaletteExamples\Properties\CommonProperties.py