setDrawingName

From RPTools Wiki
Revision as of 20:08, 19 August 2021 by Phergus (talk | contribs) (Created.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

 Note: This refers to a proposed change that has not been implemented in the main code base yet.

setDrawingName() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.10.0
Last checked for compatibility with version 1.10.0
Set the name of a MapTool drawing by drawing ID. The ID can be retrieved through the Draw Explorer or the findDrawings() macro function.

Usage

setDrawingName(map, id, name)

Parameters

  • map - Map with drawing.
  • id - Drawing ID.
  • name - Name for drawing.

Example

Rename the Fluffy Polygon drawing.
[h: id = findDrawings(getCurrentMapName(), "Fluffy Polygon")]
[r: setDrawingName(getCurrentMapName(), id, "Pointy Polygon")]

Returns: The ID of the drawing that was renamed.

59D2A358B53843FA967553F9283069B3

See Also

Version Changes

  • 1.10.0 - Function added.