I can not create a new tool

Georgian shared this question 2 years ago
Answered

Hi

I create an point A with this onclick event:

SetValue[xx,x(A)]

SetValue[yy,y(A)]

SetValue[zz,z(A)]

and an point B with this onclick event:

Execute[{"SetValue[B,(%1,%2,%3)]"},xx,yy,zz]


I want to create a new tool with these points. So when I click on B it to move in place of A.

I want a tool because I not know the points will move and where it will move.

Best Answer
photo

You can also create :

Temp=(0,0,0) not shown

test=true

and put this GeoGebra Script On Click to each <point> :


  1. SetValue[Temp,If[test,<point>,Temp]]

    SetValue[<point>,If[test,<point>,Temp]]

    test=!test

Comments (11)

photo
1

Hi, maybe I don't understand what you really want but :


  • using the only one GeoGebra Script for the object B : SetValue[B,A] is enough
  • a personal tool creates an object related to an other and doesn't move an object yet defined

photo
1

  1. a personal tool creates an object related to an other and doesn't move an object yet defined

Yes, now I understand.


  1. using the only one GeoGebra Script for the object B : SetValue[B,A] is enough

I know that. But I want to move that point with two clicks without know the name of this points. If I know name of object clicked ...

photo
2

You can also create :

Temp=(0,0,0) not shown

test=true

and put this GeoGebra Script On Click to each <point> :


  1. SetValue[Temp,If[test,<point>,Temp]]

    SetValue[<point>,If[test,<point>,Temp]]

    test=!test

photo
photo
1

hello

I think you want a button; when you clic this button then in a point (any new or old free point) then another point the first point is equal to second point. I think not possible or not easy.

perhaps with global javascript

photo
1

My solution and Michel Iroir solution work okay. But with checkbox or button I need open a 2D window. It is more simple if I can create an new tool or put something in toolbar. (I use only 3D window)

photo
1

... and if I have 30 or more points It is difficult without knowing the point name.


And if I create a point during lesson I need to write the scrpt code. That is impossible.

photo
photo
1

You can do this with scripting: create global click listener that checks if the object is a point and if yes moves it to the position of A.

Please see registerClickListener, getObjectType and evalCommand in

https://www.geogebra.org/ma...

photo
1

Sorry Zbynek but I do not know JavaScript. GeogebraScript I know as acceptable level. And I use Geogebra only on PC, not in browser.

photo
photo
1

punctele A si B nu au fost create de editor , adica nu le-ati creat utilizand comenzile editorului.

macrourile sunt create prin intermediul editorului


instumentele sunt create prin macrouri, nu exista macrou, nu se poate crea instrument.

photo
1

[offtopic]

Domnule Radu Niculae . Credeti-ma ca sunt satul de postarile dvs facute pur teoretic si fara continut practic. Nu am sa uit cum ati jignit pe youtube o persoana cu mari calitati in educatia din Romania asa incat va spun pentru a doua oara : dati-mi voie sa va ignor !

[/offtopic]

photo
1

Asadar, nu aveti obiect generat. De aceea nu puteti crea macrou. Pentru utilizarea GeoGebrei, in afara cunoasterii de formule scolaresti. trebuiesc cunoscute si facilitatile sale. GeoGebra contine o colectie de rutine scrise in limbajul Java, iar daca acestea nu sunt apelate corect, nu vor da rezultatele asteptate.

Un limbaj accesibil poate fi Phyton. Aplicatia Blender3d permite crearea de rutine de calcul simbolic si numeric, la fel ca la GeoGebra, numai ca Python este un limbaj asazis human readable, fata de limbajul Java care este un limbaj semicompilat. Deci pentru dvs si scolari este recomandabil studiul lui Blender3d, mai ales ca si el poate rula pe tablete . GeoGebra este o aplicatie prea inteligenta pentru posibilitatile dv.

photo
© 2018 International GeoGebra Institute