🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Customization of advanced query options

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "llyle_20499"
    New Altair Community Member
    Updated by llyle_20499

    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

    User: "rkopparthi"
    Altair Community Member
    Updated by rkopparthi

    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.