Eigenmode frequency always 0?

About the development of the FEM module/workbench.

Moderator: bernd

wmayer
Founder
Posts: 20202
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Eigenmode frequency always 0?

Post by wmayer »

Code: Select all

obj.addProperty("App::PropertyString", "SolverType", "Base", "Type of the solver", 0, True)
or

Code: Select all

obj.addProperty("App::PropertyString", "SolverType", "Base", "Type of the solver", 1)
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Eigenmode frequency always 0?

Post by bernd »

Thanks werner, PullRequest: viewtopic.php?f=17&t=13756
prrvchr
Posts: 144
Joined: Sun Oct 05, 2014 7:38 pm
Location: France

Re: Eigenmode frequency always 0?

Post by prrvchr »

wmayer wrote:
When loading a project an object's __init__ function won't be called but its __setstate__ function is called instead. So, it should work to call

Code: Select all

self.Object.setEditorMode("MyProperty", 1)
I do not understand because:

Code: Select all

self.Object = vobj.Object
must be done in the attach() method of ViewObject (without self.Object is a missing attribute)
When loading from file it seem that __setstate__ () is executed before attach() !!!
I may be missing something...
Son
Posts: 8
Joined: Mon May 26, 2014 4:06 am
Location: Florida, USA

Re: Eigenmode frequency always 0?

Post by Son »

wmayer wrote:

Code: Select all

obj.addProperty("App::PropertyString", "SolverType", "Base", "Type of the solver", 0, True)
or

Code: Select all

obj.addProperty("App::PropertyString", "SolverType", "Base", "Type of the solver", 1)
I played around with this :D and found that if you want the property hidden, set the last argument to -1 (not 2 like setEditorMode)

Code: Select all

x1 = 2.0*App.Units.Inch
groupLabel = "Point 1"
toolTip = "X coordinate of point 1"
obj.addProperty("App::PropertyLength", "X1", groupLabel, toolTip, -1).X1 = x1
Post Reply