Bug on CreateDCI Function
-
Hi, I think that on 4.0-2227 ther's a bug in CreateDCI Function, in docs pollingInterval parameter should be 0 for "default", but if you use it the new DCI will have 0 as pollinInterval time. If I use null all seems to be fine.
retentionTime parameter works fine with "0", but with null do strange things, randomly some DCI will have default, somother will have a blank valueTest script to test it:
NodeName="xxxxx"; //existing node name Mynode = FindObject(NodeName); value=%(1,2,3,4,5,6,7,8,9,10); //new dci names for (v : value) { if (!FindDCIByName(Mynode, v)) { println("-------------------NEW----------------------------"); newDci = CreateDCI(Mynode, DataSource::INTERNAL, v , "TEST " . v, DCI::FLOAT, null, 0); // <<-- null,0 = OK // null,null = random retentionTime result // 0,0 = 0 pollingInterval set } else { println("-------------------" . NodeName . "->". v . " ALREADY EXIST----------------------------"); } }Thanks
Alessandro -
Hi!
Yes, it's a bug, it will be fixed and included in next patch release.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login