Prior 2.1-M3, It was possible to create Data Collection Item in nxshell like this:
template_id = session.findObjectByName("Some_template").getObjectId()
config = session.openDataCollectionConfiguration(template_id)
DCIid = config.createItem()
DCI = template_config.findItem(DCIid)
Now, createItem method requires DataCollectionObject instance. Moreover, DataCollectionObject constructor is protected and requires an id parameter.
How can I create DCI using this method or what is the right way to create DCI in template using nxshell?
Hi,
DataCollectionObject is a base class for DataCollectionItem and DataCollectionTable. You should create new DataCollectionItem object and pass it to createItem. Pass 0 is ID for new DCI.
Best regards,
Victor
Thank you, Victor!