Electronics

Electronics

Topics related to HFSS, Maxwell, SIwave, Icepak, Electronics Enterprise and more.

Hfss Script problem

    • Abdou1
      Subscriber

      hello


      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",())



      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?

    • Abdou1
      Subscriber

      i just added the frequency it work 

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

      If any one intrested

    • NaplonDennis
      Subscriber
      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
    • Abdou1
      Subscriber
      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
    • NaplonDennis
      Subscriber
      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.
    • Abdou1
      Subscriber
      hello
      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"

    • rtk
      Ansys Employee
      Hello Array , Array,

      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,

    • Supriya
      Subscriber
      .


      Hello, I want to extract average value of torque from ansys in matlab. But following error is coming.

      Can anyone tell me which variable i have missed in following

      var = oModule.GetOutputVariableValue('Torque1','Torque1:avg(Moving1.Torque:Curve1','Max');

      No method 'GetOutputVariableValue' with matching signature found for class 'Interface.55F20A31_789B_4D15_BCCE_82F702411155'.

      .
Viewing 7 reply threads
  • The topic ‘Hfss Script problem’ is closed to new replies.