ObjectDescription
ObjectDescription
返回对象描述。
string ObjectDescription(
string object_name // object name
);参数
- object_name
[in] 对象名称。
返回值
对象描述。对于 OBJ_TEXT 和 OBJ_LABEL 类型的对象,将返回这些对象绘制的文本。要获取详细的错误信息,需要调用GetLastError()函数。
示例:
// writing the chart objects list to the file
int handle, total;
string obj_name,fname;
// file name
fname="objlist_"+Symbol();
handle=FileOpen(fname,FILE_CSV|FILE_WRITE);
if(handle!=false)
{
total=ObjectsTotal();
for(int i=-;i<total;i++)
{
obj_name=ObjectName(i);
FileWrite(handle,"Object "+obj_name+" description= "+ObjectDescription(obj_name));
}
FileClose(handle);
}另请参阅
最后更新于