Eigenmode frequency always 0?

About the development of the FEM module/workbench.

Moderator: bernd

wmayer
Site Admin
Posts: 14640
Joined: Thu Feb 19, 2009 10:32 am

Re: Eigenmode frequency always 0?

Postby wmayer » Tue Jan 05, 2016 12:24 pm

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
Posts: 8233
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Eigenmode frequency always 0?

Postby bernd » Wed Jan 06, 2016 6:09 am

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

Re: Eigenmode frequency always 0?

Postby prrvchr » Thu Jan 07, 2016 7:14 pm

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?

Postby Son » Fri Mar 31, 2017 5:01 am

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