Query specific parameter number with C#

I am trying to get specific parameter number for SCOM.

Say example I want to query parameter number 2 of SCOM.

I am using this syntax, but its not working.  

arr[2] = ele.GetAsString(DbAttributeInstance.PARA, qual1);

I know qualifiers are for different purpose but as result is an array, i couldnt collect it as string.

Appreciate if somebody can help. Thanks

Parents
  • most probably the methods which you are trying to access is deprecated. However you can try following direct pml evaluations...

    ac.Command.CreateCommand("!X = param 1").run();

    and depending on you !x datatype you can use any one of the following method,

    ac.Command getCommand = ac.Command.CreateCommand("");
    // Converting to Upper Case is necessory
    string varString    = getCommand.GetPMLVariableString("x".ToUpper());
    bool varBool        = getCommand.GetPMLVariableBoolean("x".ToUpper());
    double varReal      = getCommand.GetPMLVariableReal("x".ToUpper());

Reply
  • most probably the methods which you are trying to access is deprecated. However you can try following direct pml evaluations...

    ac.Command.CreateCommand("!X = param 1").run();

    and depending on you !x datatype you can use any one of the following method,

    ac.Command getCommand = ac.Command.CreateCommand("");
    // Converting to Upper Case is necessory
    string varString    = getCommand.GetPMLVariableString("x".ToUpper());
    bool varBool        = getCommand.GetPMLVariableBoolean("x".ToUpper());
    double varReal      = getCommand.GetPMLVariableReal("x".ToUpper());

Children
No Data