Das Wissen aller Anwender nutzen

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.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

[Frage] [PythonParts] Script Object PythonPart and preview [Gelöst]

Schlagworte:
  • Pythonpart
  • ScriptObject
  • Preview

Hi,

I'm looking at preview inside scriptobject.

In my case, I'm using

PointInteractor
to 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

Lösung anzeigen Lösung verbergen

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