You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm kind of new to PyMechanical but I have started to have a look at it for one project. I have been asked to record here my suggestions for PyMechanical:
Injected variables in update_globals should be available to get imported normally. This way, you can use autocomplete with them and their types can be inspected easily.
I personally think that if update_globals is going to be mandatory, as well as the line app = mech.App(), I would vow for unify both like: app = mech.App(globals()).
Make the repr of getterwrapper to show the repr of the thing it wraps.
The objects should support most of their properties as arguments of the constructors (I'm aware some of them already do)
More to come...
l am kind of new using PyMechanical, so feel free to comment if I'm missing something!
The text was updated successfully, but these errors were encountered:
Injected variables in update_globals should be available to get imported normally. This way, you can use autocomplete with them and their types can be inspected easily.
This already sort of works. You can do this:
import ansys.mechanical.core as mech
app = mech.App(version=251)
from ansys.mechanical.core.embedding.enum_importer import *
app.Graphics.Camera.SetSpecificViewOrientation(ViewOrientationType.Iso)
The catch is, you have to do the enum_importer after initializing the app.
So, the enum importer should throw an exception if it is used and there is no app
TODO:
Add an exception if the enum importer is used before the app is initialized
update 1 or more example to use the enum importer instead of globals()
personally think that if update_globals is going to be mandatory, as well as the line app = mech.App(), I would vow for unify both like: app = mech.App(globals()).
Agreed. But it should be a named argument app = mech.App(globals=globals())
Hi! I'm kind of new to PyMechanical but I have started to have a look at it for one project. I have been asked to record here my suggestions for PyMechanical:
update_globals
should be available to get imported normally. This way, you can use autocomplete with them and their types can be inspected easily.update_globals
is going to be mandatory, as well as the lineapp = mech.App()
, I would vow for unify both like:app = mech.App(globals())
.repr
ofgetterwrapper
to show therepr
of the thing it wraps.l am kind of new using PyMechanical, so feel free to comment if I'm missing something!
The text was updated successfully, but these errors were encountered: