AutoPatrol, Bureaucrats, Administrators
683
edits
Line 51: | Line 51: | ||
= Sample Scripts = | = Sample Scripts = | ||
== Create Container and some nodes == | == Create Container and some nodes == | ||
< | <syntaxhighlight lang="python"> | ||
parentId = objects.GenericObject.SERVICEROOT # Infrastructure Services root | |||
cd = NXCObjectCreationData(objects.GenericObject.OBJECT_CONTAINER, "Sample Container", parentId); | cd = NXCObjectCreationData(objects.GenericObject.OBJECT_CONTAINER, "Sample Container", parentId); | ||
containerId = session.createObject(cd) # createObject return ID of newly created object | containerId = session.createObject(cd) # createObject return ID of newly created object | ||
Line 66: | Line 67: | ||
nodeId = session.createObject(cd) | nodeId = session.createObject(cd) | ||
print '"%s" created, id=%d' % (name, nodeId) | print '"%s" created, id=%d' % (name, nodeId) | ||
</ | </syntaxhighlight> | ||
== Change Object comments == | == Change Object comments == |