Да, добавил:
ссылку на сборку "MasterSCADA.RT.dll",
и в код добавил "using MasterSCADA.RT.Windows.ControlContextMenu;"


private void add_log<T>(string name, T x){
HostFB.TreeItemHlp.Project.ErrorTracer.ReportError (name+"="+x.ToString());
}
void Show_Trend(){
foreach (IDocumentHlp document in HostFB.TreeItemHlp.Project.Documents){
IAttributeHlp attribute = document.Attribute;
if (attribute.Opened){

var mnemoInfo = attribute.CurrentCallInfo;
var callType = mnemoInfo.CurrentCallType;
add_log("mnemoInfo",mnemoInfo);
add_log("callType",callType);

if (attribute.DocumentInfo.Handle != 0 && callType == MasterSCADA.Interfaces.ECallType.ctWindow ){

string path="Объект.Котельные.Значение параметра";
var item=HostFB.TreeItemHlp.Project.Item(path);
var ccms = (ControlContextMenuService)HostFB.TreeItemHlp.Proj ect.Services.GetService(typeof(ControlContextMenuS ervice));
ccms.ShowTrend(HostFB.TreeItemHlp.Project, (ITreePinHlp)item, true, false, (System.IntPtr)attribute.DocumentInfo.Handle );
return;
}
}
}
}



1. Всё компилируется, но непонятно, что подставить в качестве "IntPtr owner": выдаёт исключение "Выполнение Котельные.Скрипт | Адресат вызова создал исключение. : 0X80131604"

2. Как модифицировать строку "HostFB.TreeItemHlp.Project.ErrorTracer.ReportError (name+"="+x.ToString())", чтобы сообщения в лог попадали без статуса "ошибка"?