<?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[NXShell change geoLocation]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I am trying to set the geoLocation on some containers using nxshell.<br />
I am not able to find how to set the geolocation neither how to update the geolocation of my node</p>
<p dir="auto">cd = session.findObjectById(123)<br />
geo = cd.geolocation<br />
print geo</p>
<p dir="auto">This works but now ...</p>
<p dir="auto">geo.setLatitude(11.1) or anything  in this way does not work.</p>
<p dir="auto">And then I can not find a  cd.setGeoLocation()<br />
And neither  cd.geolocation = geo  works as it is a read-only attribute.</p>
<p dir="auto">Regards.</p>
]]></description><link>https://forum.netxms.org/topic/5823/nxshell-change-geolocation</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:58:59 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5823.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Feb 2019 15:39:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NXShell change geoLocation on Sat, 02 Feb 2019 12:24:43 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Geolocation is an immutable object, so you have to create new object when you need different location. NetObj and derived classes are also immutable, so you have to use NXCObjectModificationData class and session.modifyObject method. Working example for getting and setting geo location for node:</p>
<pre><code>from org.netxms.base import GeoLocation

node = session.findObjectByName("netxms")
print node.getGeolocation()
md = NXCObjectModificationData(node.getObjectId())
md.setGeolocation(GeoLocation(11.0, 22.0))
session.modifyObject(md)
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/25299</link><guid isPermaLink="true">https://forum.netxms.org/post/25299</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sat, 02 Feb 2019 12:24:43 GMT</pubDate></item></channel></rss>