This functionality is part of HDC.EmbeddedAPI controller and allows an external application to place selected icons based on object ID.
For available system icons, please review this guide: Icons
Sample icons with a context menu placed in individual rooms:
Both internal and external IDs are supported. Icons are created based on configuration object with the following structure:
Applicable if IDs given are from external domain
External object class (only used with domain ID
Common icon ID for all objects (check icon ID in system configuration) Can be used per object
If the real icon size is not adequate, it can be altered by changing this parameter accepted values are between 1 and 100. It will be applied evenly to width and height to maintain proper aspect ratio Can be used per icon.
Optional icon alignment parameter, can be used per object.
Available options for optional alignTo parameter
Indicate a default value for icon fixed size:
Optional fixed position of the icon (can be saved and restored by an external system)
Internal or external domain ID (see domain config above)
Optional object label for the context menu
Menu - Callback Function
A function given as callback in configuration must be set before the configuration object is created and passed to HD.EmbeddedAPI.
Menu configuration parameters:
Name of the menu item
Callback function that should be called when menu item is selected
Context that should be set for callback
Icon class to be used, choose from any FontAwsome 5 icons
Choose from gallery of icons in Regular type:
A test function can look like this:
The function will be called with a proper context as set in configuration and with "parameters" argument containing the following information:
Symbols are a special case of Spots, and support the following events:
Change Icon Location
A preset Icon position can be passed for each object in a configuration:
A position of an Icon can be changed by the user. Later on, the position can be recorded as a reaction to event or by using getSymbols() function.
|HD.EmbededApi.clearSymbols()||Clear all symbols on the current drawing||N/A|
|HD.EmbededApi.setSymbols(symbols);||Set symbols according to passed configuration||Symbols definition object as described in this manual.|
|HD.EmbededApi.getSymbols()||Get current state of symbols, including their position||N/A|
If a high frequency refresh rate is needed for the same objects, it is advised to perform object conversion from external to internal domain once, and then use internal object class and ID to set symbols.
Otherwise, when objects are passed with external domain, conversion and server round-trip will be performed for every call. HD.EmbededApi.convertEid2hdid function can be used for this conversion.