Does anyone know the way to get the name of the current model
Altair Forum User
Altair Employee
Dear all,
I was trying to obtain the name of current model using tcl/tk, I only need the name of the model not the full path. For example if we saved the model as 1d_beam.hm, I wanna obtain this '1d_beam' using tcl/tk. I thought this will be simple but spent couple hours could not find the corresponding entity for this. Does anyone has a clue on this problem?
Regards,
Chong
0
Answers
-
Hi,
it's root-name of tail of file:
set rootname [file rootname [file tail [hm_info currentfile]]
0 -
The same result with: file rootname [file tail [hm_info hmfilename]]
0 -
Thanks for the help~~
0