Page 1 of 1

Filter specific elements for visualization.

Posted: Sat Nov 09, 2024 4:01 pm
by slbibb58
Dear STKO team,

Is it possible to filter out specific elements, such as soil elements, during the post-processing stage in STKO with mpco files, if, for instance, we have a finite element model containing soil, water, and a structure?

Thanks.

Re: Filter specific elements for visualization.

Posted: Sun Nov 10, 2024 7:18 am
by kesavapraba
Hi, You can explore the Python API option, particularly writing script using the PyMpc (a library). https://asdeasoft.net/stko-wiki/class_p ... nment.html

I would also like you to try an another option: Try to put the elements of your choice in "Selection set" in the pre-processor itself. The same selection sets can be accessed in the post-processor.

Re: Filter specific elements for visualization.

Posted: Sat Nov 16, 2024 6:41 am
by slbibb58
Thank you for your response.

For the "Selection set" option, could you please explain how to access my selection sets in the postprocessor.

For the Python API option, could you please provide more details about this option.

Thanks.

Re: Filter specific elements for visualization.

Posted: Mon Nov 18, 2024 10:08 am
by STKO Team
Get the database (MpcOdb class).

Code: Select all

db_id = 1
doc = App.postDocument()
db = doc.getDatabase(db_id)
for sset_id, sset in db.selectionSets.items():
	print(sset.name)
	print(sset.nodes)
	print(sset.elements)