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

Ansa

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2020, 12:21
Default Ansa
  #1
New Member
 
Sumit Patel
Join Date: Mar 2020
Posts: 8
Rep Power: 6
sumpate is on a distinguished road
How can we check in ansa that how many times one pid is used..?? e.g. if same pid is given to 2 parts or 3 parts or more then that ?
sumpate is offline   Reply With Quote

Old   October 19, 2020, 06:06
Default
  #2
New Member
 
Join Date: May 2014
Posts: 21
Rep Power: 11
greg.cfd is on a distinguished road
Hi, you can run this script:


Code:
# PYTHON script
import os
import ansa
from ansa import *

def main():
    deck = constants.OPENFOAM
    base.BlockRedraws(True)
    pids = base.CollectEntities(deck, None, 'SHELL_PROPERTY')
    for pid in pids:
        base.Or(pid)
        vis_parts = base.CollectEntities(deck, None, 'ANSAPART', filter_visible = True)
        print('PID ', pid._id, ' is used by ', len(vis_parts), 'parts : ', ', '.join([p._name for p in vis_parts]))
    base.BlockRedraws(False)


if __name__ == '__main__':
    main()

If you don't want to use python scripting, you can show only the PID, then open the model browser (part manager) and do a box selection from the screen. The parts of that PID will be selected.
greg.cfd is offline   Reply With Quote

Reply


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
Ansa batch mode for already running ansa window Viswa ANSA 5 May 21, 2020 15:08
Ansa sequential batchmesh sessions run very slow Ony ANSA 1 June 14, 2019 10:09
What is the right file's extension format for Solidworks/Unigraphics to ANSA? Hypermesher ANSA 2 November 15, 2017 06:26
Using Ansa for Mesh generation CellZone ANSA 1 July 7, 2017 05:30
[Commercial meshers] ANSA hexblock mesh to OpenFOAM yosuu OpenFOAM Meshing & Mesh Conversion 7 October 22, 2011 06:18


All times are GMT -4. The time now is 09:37.