[comment]: # translation:outdated

[comment]: # ({c82a485a-72868de8})
# 复制

[comment]: # ({/c82a485a-72868de8})

[comment]: # ({c28438de-76799d20})
### 说明

`object templatescreen.copy(object parameters)`

此方法允许将聚合图形模板复制到指定的模板中。

[comment]: # ({/c28438de-76799d20})

[comment]: # ({f7706a9c-0c857f5e})
### 参数

`(object)`定义了复制的聚合图形模板参数以及目标模板。

|参数               类|说明|<|
|------------------------|------|-|
|**screenIds**<br>(required 必填)|string/array|需要复制的聚合图形模板ID。|
|**templateIds**<br>(required 必填)|string/array|将聚合图形复制到模板的ID。|

[comment]: # ({/f7706a9c-0c857f5e})

[comment]: # ({240324cb-b8760eee})
### 返回值

`(boolean)`如果复制成功，则返回`true`。

[comment]: # ({/240324cb-b8760eee})

[comment]: # ({392bbd85-b41637d2})
### 范例

[comment]: # ({/392bbd85-b41637d2})

[comment]: # ({9d7e2603-0ef88c00})
#### 复制聚合图形模板

将聚合图形模板"25"复制到模板"30085"。

Request 请求:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "templatescreen.copy",
    "params": {
        "screenIds": "25",
        "templateIds": "30085"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response 响应:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": true,
    "id": 1
}
```

[comment]: # ({/9d7e2603-0ef88c00})

[comment]: # ({9ecc2c91-1e14219e})
### 源码

CTemplateScreen::copy()方法可在ui/include/classes/api/services/CTemplateScreen.php中参考。

[comment]: # ({/9ecc2c91-1e14219e})
