Resource control
Resource controls are giving the user access to the internal resources of ALLPLAN such as pen, stroke or layer.
Pen
This type of parameter is used to create a combo box for a pen selection. The result assigned to the parameter is the integer associated with the selected pen.
<Parameter>
<Name>Pen</Name>
<Text>Pen</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>Pen</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting.
Stroke
This type of parameter is used to create a combo box for a stroke selection. The result assigned to the parameter is the integer associated with the selected stroke.
<Parameter>
<Name>Stroke</Name>
<Text>Stroke</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>Stroke</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting.
Color
This type of parameter is used to create a combo box for a color selection. Unlike the parameter with RGB Color Dialog, the user can only select one of the standard ALLPLAN colors, not any desired RGB color. The result assigned to the parameter is the integer associated with the selected stroke.
<Parameter>
<Name>Color</Name>
<Text>Color</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>Color</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting.
Layer
This type of parameter is used to create a combo box for a layer selection. The result assigned to the parameter is the integer associated with the selected layer.
<Parameter>
<Name>Layer</Name>
<Text>Layer</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>Layer</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting.
Hatch
This type of parameter is used to create a combo box for a hatching selection. The result assigned to the parameter is the integer associated with the selected hatch.
<Parameter>
<Name>Hatch</Name>
<Text>Hatching</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>Hatch</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting.
Pattern
This type of parameter is used to create a combo box for a pattern selection. The result assigned to the parameter is the integer associated with the selected pattern.
<Parameter>
<Name>Pattern</Name>
<Text>Pattern</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>Pattern</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting.
Face style
This type of parameter is used to create a combo box for a face style selection. The result assigned to the parameter is the integer associated with the selected face style.
<Parameter>
<Name>FaceStyle</Name>
<Text>FaceStyle</Text>
<Value>-1</Value><!--(1)!-->
<ValueType>FaceStyle</ValueType>
</Parameter>
- If the
<Value>
is set to -1, the parameter is initialized with current ALLPLAN setting
Font
Font style
This type of parameter is used to create a combo box for a font style selection. The result assigned to the parameter is the integer associated with the selected font style.
<Parameter>
<Name>FontId</Name>
<Text>Font ID</Text>
<Value>21</Value><!--(1)!-->
<ValueType>Font</ValueType>
</Parameter>
- You cannot assign the current ALLPLAN setting here with
-1
value!
Font emphasis
This type of parameter is used to create four buttons to control the font empasis: bold, italic, underline and crossed out.
<Parameter>
<Name>FontEmphasis</Name>
<Text>Emphasis</Text>
<Value>0</Value>
<ValueType>FontEmphasis</ValueType>
</Parameter>
The result of this parameter is a 4-bit integer, where:
- the first bit from right indicates the bold state
- the second bit from right indicates the italic state
- the third bit from right indicates the underlined state
- the fourth bit from right indicates the crossed out state
Tip
For some font styles, called ALLPLAN fonts, it is not possible to set bold
or crossed out state to True. To deactivate the emphasis options based on
the font selected by the user, use the <Constraint>
tag and specify the name
of the font parameter there
<Parameter>
<Name>FontEmphasis</Name>
<Text>Emphasis</Text>
<Value>0</Value>
<ValueType>FontEmphasis</ValueType>
<Constraint>FontId</Constraint>
</Parameter>
For the ALLPLAN fonts it is possible to control their slope angle, when the italic
state is turned on. For that reason you have to insert an angle control
into the palette. If you do that, the control must be disabled, when an non-ALLPLAN font
is selected or the italic is turned off. To achieve this behavior, you can set the
<Constraint>
tag as follows
<Parameter>
<Name>FontAngle</Name>
<Text>Angle for italic text</Text>
<Value>90</Value>
<ValueType>Angle</ValueType>
<Constraint>FontId;FontEmphasis</Constraint> <!--(1)!-->
</Parameter>
- Provide the name of the font style parameter first and the
font emphasis parameter last, separated with
;
. When the user selects an Allplan font in the first parameter, and set the italic in the second one, the angle control will be enabled.