[comment]: # ({70064420-bc514843})
# 聚合图形监控项.更新位置信息

[comment]: # ({/70064420-bc514843})

[comment]: # ({09b4ab77-ffaf9d9f})
### 描述

`object screenitem.updatebyposition(array screenItems)`

此方法允许在给定聚合图形单元格中更新聚合图形监控项。如果聚合图形单元格为空，将创建一个新的聚合图形。

[comment]: # ({/09b4ab77-ffaf9d9f})

[comment]: # ({42eaf097-512ad4c0})
### 参数

`(array)` [Screen item properties](object#screen_item) to be updated.

必须为每个聚合图形监控项定义" x "， " y "和" screenid
"属性，所有其他属性都是可选的。
只有传递的属性将被更新，其他所有属性将保持不变。

[comment]: # ({/42eaf097-512ad4c0})

[comment]: # ({13db185a-a38b62b4})
### 返回值

`(object)`
返回一个对象，其中包含在“screenitemids”属性下更新和创建的屏幕项目的id。

[comment]: # ({/13db185a-a38b62b4})

[comment]: # ({10b44098-b41637d2})
### 例子

[comment]: # ({/10b44098-b41637d2})

[comment]: # ({a7ec675b-a0b8b508})
#### 更改聚合图形监控项源ID

Change the resource ID for the screen element located in the upper-left
cell of the screen. 更改位于屏幕左上角单元格中的聚合图形中元素的资源ID。

Request:

``` {.java}
{
    "jsonrpc": "2.0",
    "method": "screenitem.updatebyposition",
    "params": [
        {
            "screenid": "16",
            "x": 0,
            "y": 0,
            "resourceid": "644"
        }
    ],
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
}
```

Response:

``` {.java}
{
    "jsonrpc": "2.0",
    "result": {
        "screenitemids": [
            "66"
        ]
    },
    "id": 1
}
```

[comment]: # ({/a7ec675b-a0b8b508})

[comment]: # ({401ae440-401ae440})
### See also

-   [screenitem.update](update)

[comment]: # ({/401ae440-401ae440})

[comment]: # ({9932f84c-69ecd081})
### 源

CScreenItem::update() in
*frontends/php/include/classes/api/services/CScreenItem.php*.

[comment]: # ({/9932f84c-69ecd081})
