Tue 21 May 2013 03:56:46 PM UTC, comment #10:
You can use the following to get the selection from the tools menu:
Or, as Sofie already suggested: directly use
|
Tue 21 May 2013 02:26:52 PM UTC, comment #9:
maybe I was a bit unclear about my question.
after pick or query of the elements, I would like to save the picked elements numbers of the mesh. If I use export from the tool menu I can export the selection but in this way I will obtain a new mesh with the selected elements which means I lose the elements number of my original mesh.
If I use the Create Report in the tools menu I can obtain the picked elements numbers (and their connectivity) of my original mesh . I then can copy paste to a txt file.
every line of the txt file will then appear like this
Element 2728: [457 458 50]
I was wondering if there was a functionality of the GUI that automatically save this file or similar (as a numpy array) and if not if I a could implement in the gui a function like Save Report
|
Tue 21 May 2013 09:18:45 AM UTC, comment #8:
There is nothing that is conceivably possible that can not be done in pyFormex.
And there is nothing that can be done in pyFormex that can not be done through the GUI.
Because pyFormex is fully open and scriptable ;)
But since there are so many ways to do anything, you will only get the best advice if you are very precise in what exactly you want to achieve.
For example, you can save a list of Geometry objects exported from the tools_menu selection under some name (say 'myselection') to a .pgf file by exectuing the following line:
You can do this in a script, or in the tools_menu (Execute pyFormex command), or in the new pyFormex interactive Python console (activate from Settings Dialog->GUI->gui/console = bc).
If the selection contains points, first make a Formex out of the objects.
Or you can print the value (in the tools menu) of the (single) exported variables and copy the text to a file.
|
Tue 21 May 2013 07:27:28 AM UTC, comment #7:
Tools->Selection->Export will export single drawable objects (Mesh, Formex...) or a list of such objects as global variable(s). If you export single objects, they can be grabbed using the Geometry menu, except for points, which should maybe be added to this menu? I don't think you can save a list of drawable objects using the pyFormex menus.
If you want the point numbers, you can print them using Tools->Selection->Create Report or instead of using the Tools menu, use draw.pick('point') in your script, which gives you a collection of actor numbers and point numbers.
|
Mon 20 May 2013 07:19:08 PM UTC, comment #6:
Yes I want to pick them and save it to a file.
How can I grab them from the GUI and save them? which menu can export a list from the global variale and save them into a file?
|
Mon 20 May 2013 07:10:15 PM UTC, comment #5:
So you just want to save it in a file?
Grab the global variable and write it to a file.
Or use a project file.
|
Mon 20 May 2013 06:24:06 PM UTC, comment #4:
Actually I thougth that was the purpose of the export but I checked in the working dir there was no saved file, but the list of point is exported as a global variable.The only problem is that I dont know how to save a list or an array from the GUI.
|
Mon 20 May 2013 05:53:10 PM UTC, comment #3:
What do you mean with 'save from the GUI'. Isn't Tools->Selection->Export doing exactly that?
|
Mon 20 May 2013 05:45:49 PM UTC, comment #2:
For some reason the highligth color was set to black. I just reset it to yellow.
Using the Create Report give the list , i just did not know it was not automatically printed as in previous version. Anyway if I would like to save the list of elements, how could I do it?
I can use Tools> Selection > Export to have the list in the global variables but how can I save it from the GUI?
|
Mon 20 May 2013 05:33:52 PM UTC, comment #1:
The picking tool works for me.
The highlight color is yellow.
After picking, the selection can be printed from the menu item
Selection->Create Report
Please provide more information is something is not working for you.
|
Mon 20 May 2013 01:08:06 PM UTC, original submission:
teh pick tool in the Gui> tools > Pick
does not returns the picked nodes,elements etc
and the selected entity it is black instead of highligthed in yellow as before
|