// Поехали!!! public bool Execute(ActionCallingContext oActionCallingContext) { string objectNames = ""; oActionCallingContext.GetParameter("objects", ref objectNames); // Получим объект текущей строки. Конечно, объектов может быт несколько, но не в этом отчете... StorableObject cable = StorableObject.FromStringIdentifier(objectNames); // Получим свойство 20237 "Топология: Трасса маршрутизации" string sCABLING_PATH = cable.Properties[20237]; MatchCollection matches = regex.Matches(sCABLING_PATH); String filteredPath = ""; var enumerator = matches.GetEnumerator(); if (enumerator.MoveNext()) { filteredPath = ((Match)enumerator.Current).Value; while (enumerator.MoveNext()) { filteredPath += ";" + (Match)enumerator.Current; } } string[] strings = new string[1]; strings[0] = filteredPath; oActionCallingContext.SetStrings(strings); return(true); }
public void XFREActionFrameOpenActionFunction() { ActionCallingContext acc = new ActionCallingContext(); acc.AddParameter("NewFrame", "1"); acc.SetStrings(new string[] { @"\\Path\To\Frame\NameOfFile.fn1" }); new CommandLineInterpreter().Execute("XFREActionFrameOpen", acc); }