CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > ANSA

ANSA Scripting

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By acurley31

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2018, 16:48
Default ANSA Scripting
  #1
New Member
 
santosh prasad
Join Date: Mar 2018
Posts: 1
Rep Power: 0
sapnite is on a distinguished road
Hello all,

I am trying to set only desired PIDs to visible in ANSA, so as to perform penetration check command on those visible PIDs.

Can anyone guide me in doing this using python scripting. Basically I am asking for the command in ANSA which is to be used.


Thanks
sapnite is offline   Reply With Quote

Old   March 14, 2018, 19:14
Default
  #2
New Member
 
Join Date: Sep 2016
Posts: 9
Rep Power: 10
acurley31 is on a distinguished road
See the attached example script. You'll have to change the filename to just have the *.py extension.

Here's a brief explanation of the idea:

1. First, collect all PIDs using the ansa.base.CollectEntities() function. For more information, refer to the documentation in the scripting library
2. Filter the PIDs to just get the desired. This is usually done via the PID name or the id associated with it.
3. Show only the desired PIDs using the ansa.base.Or() function. For more information, refer to the documentation in the scripting library
4. Perform the desired checks!

Alex
Attached Files
File Type: zip ansa_pids.py.zip (785 Bytes, 113 views)
Mrt23, Jost K and R prasad like this.
acurley31 is offline   Reply With Quote

Reply

Tags
pids, scripting, visible


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to rotate plane(360 degree) using ANSA scripting. Renu123 ANSA 1 March 14, 2018 19:26
What is the right file's extension format for Solidworks/Unigraphics to ANSA? Hypermesher ANSA 2 November 15, 2017 07:26
How to find center of model using ANSA Scripting? Renu123 ANSA 5 October 2, 2017 07:14
Ansa Python Scripting Renu123 ANSA 1 September 16, 2017 13:45
Ansa Python Scripting Renu123 ANSA 2 August 29, 2017 04:46


All times are GMT -4. The time now is 05:38.