findDrawings: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
{{param|mapName|A string containing the name of the map.}} | {{param|mapName|A string containing the name of the map.}} | ||
{{param|name|A string containing name of the searched for drawings. The only way to name a drawing is via the Draw Explorer interface.}} | {{param|name|A string containing name of the searched for drawings. The only way to name a drawing is via the Draw Explorer interface.}} | ||
{{param|delim|Optional separator. If not specified the default value {{code|","}} is used. }} | {{param|delim|Optional separator. If not specified the default value {{code|","}} is used. If {{code|"json"}} is specified, a JSON array is returned instead of a String List.}} | ||
|example= | |example= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> |
Revision as of 10:56, 9 February 2018
findDrawings() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.4.1.9
Returns the id or ids of any drawing on the specified map that match the name parameter.
Usage
findDrawings(mapName, name)
findDrawings(mapName, name, delim)
Parameters
mapName
- A string containing the name of the map.name
- A string containing name of the searched for drawings. The only way to name a drawing is via the Draw Explorer interface.delim
- Optional separator. If not specified the default value","
is used. If"json"
is specified, a JSON array is returned instead of a String List.
Example
[h:id=findDrawings("Grasslands", "block")]
[h:setFillColor("Grasslands", id,"#000000")]
[h:refreshDrawing("Grasslands", id)]