General

General

Using Python, how can a query be selected by name and exported?

    • FAQFAQ
      Participant

      The following Python commands will return the query id based on keyword for the query name, select the query based on the id, then export the query to a .csv. The -1 is necessary since the query IDs start from 1, while the number of the query used in the save commands start from 0. So there’s an offset of 1 that needs to be taken care of. queryid=ensight.objs.core.QUERIES.find(‘queryname*’, wildcard=1, group=0)[0].ID ensight.curve.select_begin(queryid – 1) ensight.curve.save(“csv”,str)