Hi,
Is there any possibility to change navigation style(inventor/CAD) from python console, instead of right click menu? or to bind a keyboard shortcut to it
thnx
Navigation style
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Navigation style
Currently, this is not possible. With the latest revision I have implemented it to allow it from python. The methods are:
Code: Select all
view=Gui.ActiveDocument.ActiveView
view.listNavigationTypes() -> all possible styles (at the moment two)
view.getNavigationType() -> current style
view.setNavigationType(string) -> set style name as string in argument
Re: Navigation style
is not working. none of these api..
apparently they are not implemented. i use 0.11 for windows from sourceforge
Code: Select all
>>> view=Gui.ActiveDocument.ActiveView
>>> view.listNavigationTypes()
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: listNavigationTypes
>>> view.listNavigationTypes()
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: listNavigationTypes
>>> view.getNavigationType()
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: getNavigationType
>>> view.setNavigationType(string)
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: setNavigationType
Re: Navigation style
As I said:
You have to wait for the next release of our 0.12 unstable version.Currently, this is not possible. With the latest revision I have implemented it to allow it from python. The methods are:
Re: Navigation style
But what you can already do is writing the according value to the preferences in python which sets the style for all 3d views.
Code: Select all
p=App.ParamGet("User parameter:BaseApp/Preferences/View")
p.SetString("NavigationStyle","Gui::InventorNavigationStyle")
p.SetString("NavigationStyle","Gui::CADNavigationStyle")