Macro Language Reference > Macros > System > iconedit
  
iconedit
Description
Allows you to edit an existing icon from a toolbar, create a new icon or import a Windows icon.
 
Example 235. Edit an existing icon
iconedit "warning"
Syntax
iconedit icon_name:s? ( file:s index:n flags:n? )?
iconedit
[no parameter]
Invoke the Icon Editor dialog box.
icon_name
The name of the icon to be created / edited / imported
file
The complete path to the file containing the icon to be imported
index
The index of the icon to be imported ( for example, the first icon within the icon file is index 0). An index value of "-1"will open the "Icon Selection" dialog if multiple icons are found. An index value larger than the last index will import the icon at the last index.
flags
A bitmask that sets the new icon’s flags:
1
System icon (not saved to siconusr.3ic)
2
Character icon
4
(reserved for system use)
8
Text icon
Additional Information
 
Some points to note about importing icons
Only 16-color icons are supported (4-bit color .ICO format). PTC ALD reserves the 16th colour for transparency and any 16 color icon that uses the full 16 colors will lose the least used color (it becomes transparent). No warning or error message is given in this circumstance.
An icon file may contain multiple icons at multiple colour depths: only icons at the 4-bit color depth will be available for import, however.
Icons may also be embedded within .DLL files, .EXE files, etc. using Microsoft’s resource format. Icons of this type are not currently supported and it is therefore recommended that you extract these sort of embedded icons to a standalone .ICO file for import. There are numerous third party Resource Editor tools available for this purpose.