Jump to content

Recommended Posts

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

advanced_query.PNG

Share this post


Link to post
Share on other sites

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

tinh likes this

Share this post


Link to post
Share on other sites
On 9/21/2017 at 4:02 PM, Saumya Mishra said:

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...