Customization of advanced query options

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi All,

 

I am trying to write a tcl/tk script wherein I need to export .csv for each component's Advanced Query results.

I am not able to find the handle to to control this option. I have attached the screenshot for clear understanding

of the problem.

 

Thanks and regards.

Saumya Mishra

<?xml version="1.0" encoding="UTF-8"?>advanced_query.PNG

Answers

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited September 2017

    Hello Saumya,

    You will have to create appropriate selection set for the advanced query.

    Writing to file can be done as below:

     

    hwi GetSessionHandle mySessionName

    mySessionName GetProjectHandle myProjectName

    set pageIndex [myProjectName GetActivePage]

    myProjectName GetPageHandle myPageName $pageIndex

    set windowIndex [myPageName GetActiveWindow]        

    myPageName GetWindowHandle myWindowName $windowIndex        

    myWindowName GetClientHandle myPostName

    set modelIndex [myPostName GetActiveModel]

    myPostName GetModelHandle myModelName $modelIndex

    myModelName GetResultCtrlHandle myResultName

    myModelName GetQueryCtrlHandle myQueryName

    myModelName GetSelectionSetHandle mySetName [myModelName

    AddSelectionSet  element]

    mySetName Add all

    myResultName SetCurrentSimulation 1

     

    myQueryName SetDataSourceProperty result datatype Stress

    myQueryName SetDataSourceProperty result shelllayer Upper

    myQueryName SetQuery 'element.id,result.value'

    myQueryName SetSelectionSet [mySetName GetID];

    myQueryName WriteData {c:/temp/d.txt};

     

    refer: https://connect.altair.com/CP/kb-view.html?kb=86072

  • rkopparthi
    rkopparthi Altair Community Member
    edited July 2019

    Hi All,

     

    I am trying to write a tcl/tk script wherein I need to export .csv for each component's Advanced Query results.

    I am not able to find the handle to to control this option. I have attached the screenshot for clear understanding

    of the problem.

     

    Thanks and regards.

    Saumya Mishra

     

     

    hi saumya,

    Did you find a way to do it. I am facing a similar problem. 

     

    Thanks and regards,

    Rahul.