Part 3:
Example 3:
Reading all data from an EDM File
The below script reads all the EDM properties and values from the ZMASTER in the LIB folder.
‘Syntax :
‘GetAllObjectValue(EDM file)
on error resume next
Msgbox GetAllObjectValue(“ZMASTER”)
Function GetAllObjectValue(strObject)
Set process = GetObject(“winmgmts://./root/novadigm:NVD_Agent”)
Set method = process.Methods_ (“GetValues”)
Set inParameters = method.inParameters.SpawnInstance_()
inParameters.Path = strObject
Set outParameters = process.ExecMethod_ (“GetValues”, inParameters)
For i=0 to UBound(outParameters.value)
GetAllObjectValue = GetAllObjectValue & outParameters.property(i) & ” – ” & outParameters.value(i) & vbcrlf
Next
End Function