Dear OpenFlipper-Team, in order to streamline and simplify my scripts (often 300-500 lines), I would like to outsource recurring passages into separate scripts and call them from a main script. I can execute scripts using the scripting interface (ScriptInterface::executeFileScript()) within my plugin, but can I do so within a script? My questions: 1. Is it possible to execute a script within another script. 2. If so, how can I pass arguments (such as an object id to be used within the called script) and how can I get a return value (e.g. object id of newly created object). 3. If not, any ideas on how to best implement it. Thank you for your kind help. Regards, Jens Kuehnle [Beschreibung: Beschreibung: Beschreibung: ipa_logo1] Jens Kühnle MSc. Dipl.-Math. Fraunhofer-Institut für Produktionstechnik und Automatisierung IPA Abteilung Bild- und Signalverarbeitung Nobelstraße 12 70569 Stuttgart, Germany Tel: +49 711 970 1861 Fax: +49 711 970 1004 mailto:jens.kuehnle@ipa.fraunhofer.de http://www.ipa.fraunhofer.de<http://www.ipa.fraunhofer.de/> http://www.stuttgarter-produktionsakademie.de/
Hi, i implemented include statements for OpenFlipper scripts. The code is currently in the Scripting-Include-Statements branch. You can use include <Full path to script> or include <ScriptPath/Releative path to script> It's not yet tested very well, but seems to work on my simple examples. The scripts are internally joined so you can directly pass variables, as if it was one large script. Tracing is available at: https://graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper-Free/issue... Best, Jan Möbius On 25.02.2016 16:23, Kühnle, Jens wrote:
Dear OpenFlipper-Team,
in order to streamline and simplify my scripts (often 300-500 lines), I would like to outsource recurring passages into separate scripts and call them from a main script. I can execute scripts using the scripting interface (ScriptInterface::executeFileScript()) within my plugin, but can I do so within a script? My questions:
1. Is it possible to execute a script within another script.
2. If so, how can I pass arguments (such as an object id to be used within the called script) and how can I get a return value (e.g. object id of newly created object).
3. If not, any ideas on how to best implement it.
Thank you for your kind help.
Regards,
Jens Kuehnle
Beschreibung: Beschreibung: Beschreibung: ipa_logo1 Jens Kühnle MSc. Dipl.-Math.
Fraunhofer-Institut für Produktionstechnik und Automatisierung IPA
Abteilung Bild- und Signalverarbeitung
Nobelstraße 12 70569 Stuttgart, Germany
Tel: +49 711 970 1861 Fax: +49 711 970 1004 _mailto:jens.kuehnle@ipa.fraunhofer.de_
_http://www.ipa.fraunhofer.de <http://www.ipa.fraunhofer.de/>_____
_http://www.stuttgarter-produktionsakademie.de/___
_ _
_______________________________________________ Openflipper mailing list Openflipper@lists.rwth-aachen.de http://mailman.rwth-aachen.de/mailman/listinfo/openflipper
-- Dipl.Inform. Jan Möbius Department of Computer Science VIII Aachen University of Technology (RWTH) Ahornstrasse 55, 52074 Aachen, Germany Phone ++49 (0)241 80-21802 Fax ++49 (0)241 80-22899 mailto:moebius@cs.rwth-aachen.de http://www.rwth-graphics.de
participants (2)
-
Jan Möbius
-
Kühnle, Jens