Page 1 of 1
Extract selected element IDs
Posted: Fri Dec 10, 2021 9:53 am
Dear STKO team,
For transferring data from STKO to inhouse programs I would need the list of mesh elements. Specifically, STKO is convenient to simply see and select the elements that I need and display their IDs when I create a Chart. However, I can not copy the element IDs when in this window:

- Untitled.png (76.1 KiB) Viewed 3300 times
Even just sorting them would be okay, as I could extract the element IDs as ranges instead of extracting them one-by-one. However, this isn't possible either. To make a long story short, is there a way to copy paste/ extract the element IDs that I select in the GUI of the post-processor?
Thanks for the advice in advance!
Bence
Re: Extract selected element IDs
Posted: Mon Dec 13, 2021 8:36 am
by STKO Team
Dear Bence,
You cannot copy paste them from the selection window, however there is a way to understand what is the source (node or element) of the Chart Data.
If you select multiple items, and extract their data using the "Keep multiple results", in the ChartData editor, there is a button "Copy Data to Clipboard". If you click it, STKO will copy all the chart items in the selected chart data on the ClipBoard.
You can then paste it on a text file or in Excel.
The first row will contain a label for each pair of columns. This label has the following format
"<name> - Element <id> - Gauss <id>"
with a simple manipulation of this data, you can get the element ids.
If this is not what you want you may use the PythonAPI to extract data.
Re: Extract selected element IDs
Posted: Mon Dec 13, 2021 9:07 am
Not the most convenient, but I can easily parse the element list from that. Thank you for the advice!
P.S.: If I may, I'd suggest adding a copy-paste feature for element/node and gauss lists from the data extraction wizard in the future. I would imagine it would be a useful feature for many academic users.
Regards,
Bence
Re: Extract selected element IDs
Posted: Mon Dec 13, 2021 11:10 am
by STKO Team
P.S.: If I may, I'd suggest adding a copy-paste feature for element/node and gauss lists from the data extraction wizard in the future. I would imagine it would be a useful feature for many academic users.
Sure, we put it in our to-do list
Re: Extract selected element IDs
Posted: Tue Dec 14, 2021 2:10 am
Thanks a lot!

Re: Extract selected element IDs
Posted: Tue Dec 14, 2021 9:35 am
For others who want to follow the element ID extraction discussed in this thread, until copying is not implemented in STKO, you can use this simple looper (attached python script) to get rid of excess text and write only the list of element numbers to a csv file.
Re: Extract selected element IDs
Posted: Wed Dec 15, 2021 9:19 am
by STKO Team
Thanks!