Electronics

Electronics

HFSS Scripting Error (‘GetDataExpressions()’) method is not working

    • mahesh2444
      Subscriber
      I am facing errors when using some of the methods provided in Reporter Editor Script Commands Module. I have attached the script that I tried to execute which causes the execution errors.noProject = oDesktop.GetActiveProject(noDesign = oProject.GetActiveDesign(noDesign = oProject.SetActiveDesign(oDesign.GetName()noModule = oDesign.GetModule('ReportSetup') nexpressions = oModule.GetDataExpressions(nMissingMemberException: 'IDispatch' object has no attribute 'GetDataExpressions'nThe same issue is happening with most of the methods provided in this module. I have listed a few of them as follows:nGetSweepValues, GetDataUnits, GetDesignVariableNames, GetSolutionDataPerVariationn If anyone how to use these methods properly in order to get the plot data without exporting it into a file, please respond to this question.
    • AndyJP
      Subscriber
      actually, I would love to see a solution myself. setting design variables is described, and can be generated using script wizzard. But building object references for reading report values is not covered in manuals. n
    • rtk
      Ansys Employee
      Hello Mahesh-nThe above mentioned error is because the Module 'ReportSetup' cannot handle these set of attributes/functionalities. nAs per the script that you have written, it should return the values. nLet us work on this with some expertise team and will get back to you!Beat Regards,n
    • AndyJP
      Subscriber
      Still, oDesign.GetName() does not work. So how can I refer a design name for functions like AddMessage ?nDesktop.AddMessage oProject.GetName(),oDesign.GetName(),0, messagetext nIt always fails.nnoProject.GetActiveDesign() is also non-functional, while it works in other ANSYS products.n
    • mbeliaev
      Ansys Employee
      since this commands are not part of this module. First you need to get object using GetSolutionDataPerVariationnnalso this is senselessnoDesign = oProject.GetActiveDesign()noDesign = oProject.SetActiveDesign(oDesign.GetName())nthis is enough:noDesign = oProject.GetActiveDesign()nn
    • mbeliaev
      Ansys Employee

      Still, oDesign.GetName() does not work. So how can I refer a design name for functions like AddMessage ?Desktop.AddMessage oProject.GetName(),oDesign.GetName(),0, "messagetext" It always fails.oProject.GetActiveDesign() is also non-functional, while it works in other ANSYS products.https://forum.ansys.com/discussion/comment/98304#Comment_98304

      please open another threadn
    • AndyJP
      Subscriber
      oDesign = oProject.GetActiveDesign()nNo. It does not work in HFSS. n
    • mahesh2444
      Subscriber
      It works and returns the handle to the currently active designn
    • AndyJP
      Subscriber
      on my machine EDT 2000R1 driven modal HFSS throws a script error.n
    • AndyJP
      Subscriber
      is there a way to enumerate all the designs, find the one which is HFSS driven modal or eigenmode (which is normally active when starting a script for HFSS.... but since I can not get it straightforward...). And then, get its string name for substituting to set-function explicitly?n
    • AndyJP
      Subscriber
      Ah, I know what's wrong. When going to the script library, the design is no more active. That is a not so friendly behaviour. nSo, the best approach would involve designs enumeration, if properties like solver, text name and numeric order or last access time could be acquired.n
Viewing 10 reply threads
  • You must be logged in to reply to this topic.