Compress PID - Python script
Hey Guys!
I would like to ask for a help. I need a Python script to Compress all the PIDs with same thickness in a model. Always keep the lower PID-ID and put all the Entities from the other properties to the one is kept. I have found a easy way to compress Materials with the same name and/or same values, but coudnt find this feature for PIDs. Mostly we are working with NASTRAN or LS-DYNA. I hope someone can help me with it. Thanks in advance! |
i don't know how to do this by scripting.
but you can show only elements/entities/etc with the same thickness. then select all shown entities/elements/etc->modify->PID->set some and compress=) easy=) |
but be carfully, because you will have problems with hiding/showing some entities if you keep only 1 PID... but if you doesn't work with huge assembles it isn't a issue to you=)
|
Hi!
Thanks for the reply. This is actually what we are doing, but i need a script to do it with a single click. Btw i'm working on the script, but i'm not so good with python so i'm kinda suffering to write it. Sometimes our single-part models have several PIDs with the same tickness and if we have like 30 different thicknesses, then making the compression manualy (like you assumed) takes time. I just need a script for this to do it in secounds instead or minutes. |
it takes secund, you are quite right-it is ot 1 click.
but ANSA is good in hide/show possibilities! in data manager sort by thickness->show only and do that i write =) it takes 10-15 seconds if you have a 100 pids with the same thickness=) but if you want to scripting...) it will be great.) |
Hi,
You can try something like: Code:
# PYTHON script import os Greg |
Thank You very mutch!
It's working like a charm! :) |
All times are GMT -4. The time now is 05:15. |