findDrawings: Difference between revisions
Jump to navigation
Jump to search
(Updated with wildcard option for drawing name.) |
m (Conversion script moved page findDrawings to FindDrawings without leaving a redirect: Converting page title to first-letter uppercase) |
(No difference)
|
Revision as of 22:31, 9 February 2023
findDrawings() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.5.0
Returns the id or ids of any drawing on the specified map that matches 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. Pass"*"
to get all drawings. Drawings can be named via the Draw Explorer interface or using setDrawingName().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)]
See Also
Version Changes
- 1.10.0 - Added wildcard option for drawing name.