Open TermeHansen opened 1 year ago
using the java handle I can get what I want, but shouldn't properties() return this?
{k:p.java.get(k) for k in p.java.varnames()}
As far as I can tell, this is all expected behavior. As in: It works as documented. So I guess you wish the high-level Python API would support this use case. Which it doesn't: It simply returns all parameters, it doesn't let you narrow it down to specific groups. Though you've already figured out how to use the low-level Comsol Java API to accomplish that.
Those nodes have no properties because the Comsol API does not treat parameter names like properties. This is why you have to call java.varnames()
instead of java.properties()
.
I guess if you're looking to change the Python API, we could discuss adding an optional argument group=None
(or something) to Model.parameters()
. I don't see any harm in that.
How can I easy get the parameters split out into the parameter groups they exists as?
model.parameters()
just give me the full dict for all parameters, but how do I get the same dicts for each parameter group instead? I can get the groups by using the children on the 'parameters', those nodes have no properties however?!?gives: