Read numeric values of a point's coordinates

Chris Elbers shared this question 2 months ago
Answered

I want to assign the current coordinates of an existing point A to another point B and then be able to move A without at the same time moving B. I know I can do that by opening B's Properties / Settings and then entering the numeric coordinate values in B's definition, thus disconnecting B from A. But I want to do that in a script. The information is available in the Algebra window, so it should be accessible directly.

I'm sure this question must have been asked many times, but I can't find an answer in the resources.

Comments (3)

photo
1

I found the answer myself.

B=CopyFreeObject(A)

will do the trick.

photo
1

hi:

See this file. Is that what you want?

photo
1

or this file

© 2020 International GeoGebra Institute