User Tools

Site Tools


Sidebar

dictionary:unitinformation:setonicon

Set On Icon For

Sets or changes the icon displayed in the interface when the unit is on.

Usage:

set on icon for (name of unit) to (name of icon file in the Icons folder)

Examples:

 set on icon for “main door lock” to “locked.png”

Notes:

  • The name of the icon should be the full image name including the suffix, ie. .jpeg or .png
  • Any standard image file type supported by the system can be used as Icons.
  • To preserve transparency and mask information you should use PNG files. JPEG files work fine but will draw as the image on a white square since they do not include an alpha channel or a Mask.
  • If you simply wish to use a different icon for the ON and OFF status you can set that in the Edit Unit Window being able to set it via script opens up the possibility of showing more than just the 2 states based on other information or events.
  • Location of the Icons folder: If you have placed XTension in the Applications folder the database and all support files are placed in a folder named “XTension Support” which is created in the users Application Support folder. As a shortcut for finding these you can select the “Reveal Database In Finder” menu item from the Database menu. That will also reveal the Icons folder. If you’ve placed XTension in it’s own folder elsewhere then the database and all support files will be placed alongside the application in that same folder. The “Reveal Database In Finder” menu will work in this situation too.
  • After adding new Icons to the folder on disk you will need to select the “Look for new Icons” menu item in the file menu to load them and make them available. Icons are otherwise only loaded at startup.
  • All Icons are loaded at startup, or when you select the “Look for new Icons” menu item, and saved in memory for faster drawing. Putting thousands of large images that you’re not going to use in the folder will slow down the startup of the app and cost memory.
dictionary/unitinformation/setonicon.txt · Last modified: 2017/10/15 16:06 by James Sentman