ID of Newly Created Tag(s)
- Last UpdatedOct 29, 2024
- 1 minute read
When the user creates a tag using the PML script, tag are created but the refNo for the newly created tag is unavailable.
To obtain the refNo for the newly created tag(s)
clock init
import 'Aveva.Engineering.PMLElementManager'
using namespace 'Aveva.Engineering.PMLElementManager'
!createTagsObject = object CreateElements()
do !x from 1 to 10
!tagsObject = object CreateElement()
!tagsObject.SetElementTypeByName(':MotorControlCentre')
!attVal = 'MCC'
!tagsObject.AddAttributeValue(':NamePrecedent',!attVal)
!createTagsObject.AddCreateElement(!tagsObject)
enddo
!a = !createTagsObject.Execute()
Q var !a
clock read