Hfss Script problem


i am trying to create script to get the value of im(Gamma(1)) in the end of simulation ,
i create an output variable : GG equal "i'm(Gamma(1)) "
and i used this function to get the value of my output variable

var = oModule1.GetOutputVariableValue    ("GG",  "Setup1" ,  "PortOnly",  "Modal Solution Data",Array())

error: "Extracting value for the output variable 'GG' requires more variable values to be specified"

which variable is missing ?

there is another way to get the im(Gamma(1)) with Script?


  • Abdou1Abdou1 Member
    edited February 28

    i just added the frequency it work 

    var = oModule1.GetOutputVariableValue    ("GG", "freq='52.2GHz'", "PortOnly","Modal Solution Data",Array())

    If any one intrested

  • NaplonDennisNaplonDennis Member
    edited October 12

    Hello, I used the GetOutputVariableValue function in MATLAB, hoping to change 52.2 in 'FREq = 52.2ghz' into the parameter x, like this:

    var = oModule1.GetOutputVariableValue  ('GG', "freq='x'", 'PortOnly','Modal Solution Data','');

    But there would be an error as follow:

    No method 'GetOutputVariableValue' with matching signature was found for class 'interface.55f20a31_789b_4d15_bcce_82f702411155'.

    Do you know how to solve it

  • Hello

    i did understand your issue very well, the command in top to get an output variable value in (ANSYS HFSS soft ) it written with VBscript, it should be executed in ANSYS HFSS

  • Thank you for answering me very soon!

    My purpose is to obtain maxwell's calculation results by using matlab program. I rewrite the VBS program into a syntax structure consistent with MATLAB, but there was a problem in this statement, because 52.2ghz could not be parameterized.

  • Abdou1Abdou1 Member
    edited October 14


    your welcome

    no we can parameterized it, in VBs ther is a type name Dim, you can creat a variable Dim and stick the number 52.2 with the char Ghz and the resulte in the variable of type Dim.

    like i did :

    Dim varfr

    (fr : number type)

    varfr = fr&"GHz"

  • rtkrtk Pune, IndiaForum Coordinator
    edited October 19

    Hello @NaplonDennis , @Abdou1,

    I would suggest calling your already available scripts from MATLAB, if that makes things easier for you.

    Matlab have many external interfaces from which you can call scripts in other formats like .vbs, .py etc.. and even DLLs.

    You can use 'loadlibrary' function in Matlab, if you want to call from DLLs.

    Another way is to call other COM objects from MATLAB (check here).... or use COM API within MATLAB.

    So, for your case, initialize HFSS COM object first and then proceed using MATLAB like I mentioned above.

    Also, you can call MATLAB function from VB . Check here

    Hope this addressed your concern!

    Best Regards,

Sign In or Register to comment.