Hi,
I'm looking at preview inside scriptobject.
In my case, I'm using
PointInteractorto place an object (wich works) and I'd like to have a preview following the mouse.
How can I do that and there is an example ?
Best
Christophe
Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.
Melden Sie sich jetzt an und diskutieren Sie mit!
Hi,
I'm looking at preview inside scriptobject.
In my case, I'm using
PointInteractorto place an object (wich works) and I'd like to have a preview following the mouse.
How can I do that and there is an example ?
Best
Christophe
Hi Christophe,
when you construct the PointInteractor, you can add a preview function, that will be called everytime the mouse is moved. For example, in the SlabOpening.py:167 the PointInteractor is created with the preview function "draw_opening_preview" which is defined in line 191. Note, that the function cannot take any arguments. It will only be called when the mouse is moved, so it only has to draw something. The current point should be taken from the result class (see line 195).
Best,
Bart
Hi Christophe,
when you construct the PointInteractor, you can add a preview function, that will be called everytime the mouse is moved. For example, in the SlabOpening.py:167 the PointInteractor is created with the preview function "draw_opening_preview" which is defined in line 191. Note, that the function cannot take any arguments. It will only be called when the mouse is moved, so it only has to draw something. The current point should be taken from the result class (see line 195).
Best,
Bart