GPSalachs wrote:
I took then the python script and attached it to the parametric.comm file so to be able to make variables of the geometry for OT/Persalys .
Hi GPSalachs,
Can you please explain the python script attachment-method to parametric.comm file ?
Did you paste the script inside a function {and outside DEBUT() and FIN() and called it from within} or did you paste it after DEBUT() {or before it maybe} ?
I tried these methods but I cannot get it to work, it says:
"No results are available. An error has occurred during the execution of the analysis.
The evaluation of the point number 0 is in error such file: '/tmp/salome_localres_workdir_sam/mesh.med'. Please check the Case View/DataFiles tab."
How do you get the mesh out and what did you write in the export file for the mesh {I use F libr mesh.med D 20}?
In my case there is no mesh.med in /tmp/ .
I have exported the geometry as below in the geometry file.
try:
Mids.ExportMED(r'mesh.med',auto_groups=0,minor=-1,overwrite=1,meshPart=None,autoDimension=1)
pass
except:
print('ExportMED() failed. Invalid file name?')
Regards,
Samprit
[UPDATE]
I can do it now. I put the python code between DEBUT() and FIN() and also put a dummy{previously generated mesh file with the groups that are used in comm file} mesh.med in that location {/tmp/salome_localres_workdir_sam/mesh.med}. I did not add mesh.med in files tab of OT. But, it is early for me to say that it is a correct method. However the mesh.med file gets regenerated at the time of every new run folder creation, as indicated by{>> ll | grep mesh.med}.