<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Получить node в PostObjectCreate для Interface]]></title><description><![CDATA[<p dir="auto">Как получить Node для вновь созданного Интерфейса?</p>
<pre><code>sub postInterface(interface)
{
	trace(0, "'" . interface-&gt;id . "'");
	trace(0, "'" . interface-&gt;node . "'");
	parents = GetObjectParents(interface);
	foreach(p : parents)
	{
		trace(0, "Parent object: id=" . p-&gt;id);
	}
}

trace(0, "Hook::PostObjectCreate on object class '" . classof($object) ."'");
if (classof($object) match "Interface")
	postInterface($object);
trace(0, "End");
</code></pre>
<p dir="auto">выдаёт:</p>
<pre><code>2019.03.29 11:57:28.714 *I* Hook::PostObjectCreate on object class 'Interface'
2019.03.29 11:57:28.714 *I* '50817'
2019.03.29 11:57:28.714 *I* ''
2019.03.29 11:57:28.714 *I* End
</code></pre>
]]></description><link>https://forum.netxms.org/topic/5879/получить-node-в-postobjectcreate-для-interface</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:21:48 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5879.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Mar 2019 09:09:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Получить node в PostObjectCreate для Interface on Fri, 29 Mar 2019 11:51:31 GMT]]></title><description><![CDATA[<p dir="auto">Сейчас этот хук вызывается после создания объекта но перед добавлением его к ноде, поэтому список родительских объектов пустой. Я подумаю что здесь можно сделать.</p>
]]></description><link>https://forum.netxms.org/post/25507</link><guid isPermaLink="true">https://forum.netxms.org/post/25507</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 29 Mar 2019 11:51:31 GMT</pubDate></item></channel></rss>