Hello Christophe,
In a .geo file, the ONELAB attributes that are not default ones (see _setStandardOptions
in Common/GmshMessage.cpp) don't end up in the database: is this the expected behaviour?
If yes, what would be the way to define 'custom' attributes in a .geo/.dat file?
If not, here is a proposal for a fix, which define a new function _setOtherAttributes
.
By the way, one could go even a step further, and remove all calls to p->setAttribute(...)
in _setStandardOptions
, since they should be handled by _setOtherAttributes
.
As an illustration, here is a small MWE mwe_onelabAttributeGeo.zip.
When calling gmsh test.py
, the variable L1
does not show the Ham
attribute (defined in the .dat file), while the L2
variable does (defined in the .py file).
Cheers, Nicolas.