How to use position values in expressions?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
chrisb
Posts: 22455
Joined: Tue Mar 17, 2015 9:14 am

Re: How to use position values in expressions?

Postby chrisb » Mon Sep 09, 2019 3:06 pm

BassMati wrote:
Mon Sep 09, 2019 2:07 pm
In freecad, I need to know at least the first letter of the member name to get a pick list… But I can live with that.
I don't know the reason for this, perhaps it is due to not showing all members. There are still some issues in 0.19, but realthunder is aware of them, and we may get an improved version after his very well deserved vacations.
BassMati
Posts: 81
Joined: Sat Oct 06, 2018 11:39 am

Re: How to use position values in expressions?

Postby BassMati » Mon Sep 09, 2019 3:45 pm

Autocompletion works fine in the mainstream 0.19 version, so, yes, it is just Assembly3 related. Except, when I enter an object name followed by a dot, I am used to get a list of members. In Freecad I have to guess at least the first letter, but then it works.
BassMati
Posts: 81
Joined: Sat Oct 06, 2018 11:39 am

Re: How to use position values in expressions?

Postby BassMati » Tue Sep 10, 2019 8:51 am

Python Console looks very promising, however, I guess I have to get more familiar with the object model(s) first.
Anyway, big thanks for the valuable support here!
Ulrich
openBrain
Posts: 3406
Joined: Fri Nov 09, 2018 5:38 pm

Re: How to use position values in expressions?

Postby openBrain » Tue Sep 10, 2019 10:37 am

BassMati wrote:
Tue Sep 10, 2019 8:51 am
Python Console looks very promising, however, I guess I have to get more familiar with the object model(s) first.
Anyway, big thanks for the valuable support here!
Ulrich
Just notice that auto-completion in Python console stops working as soon as a function or array index is used.
So if you want to explore eg. what is inside getSelectionEx() you have to do something like :

Code: Select all

>>> Gui.Selection.getSelectionEx() ### at this point auto-completion won't work anymore thus ...
>>> selex = Gui.Selection.getSelectionEx()[0]
>>> selex. ### Ahhh, auto-completion is working again :) Let's continue a bit
>>> selex.SubObjects[0] ### arf, stop working again, let's assign a variable
>>> subobj = selex.SubObjects[0]
>>> subobj. ### Ahhh, working again. Etc...
BassMati
Posts: 81
Joined: Sat Oct 06, 2018 11:39 am

Re: How to use position values in expressions?

Postby BassMati » Wed Sep 11, 2019 11:41 am

Good to know. Thx!