02_user_tutorials:08_technical_features:xparametric-model
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| 02_user_tutorials:08_technical_features:xparametric-model [2025/01/24 15:51] – ↷ Page moved from 02_user_tutorials:technical_features:xparametric-model to 02_user_tutorials:08_technical_features:xparametric-model tim2 | 02_user_tutorials:08_technical_features:xparametric-model [2025/12/05 09:44] (current) – removed Tim | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Forward parameters from the command line to a project ====== | ||
| - | |||
| - | It is possible to forward parameters from the command line to GroIMP using additional parameters beginning with an capital X. | ||
| - | This parameter can than be accessed by all models opened. | ||
| - | For a model that is suppose to greed the user this additional parameter could be the name, therefore the command line parameter would be '' | ||
| - | To access this parameter than in GroIMP the function getProperty of the class Main needs to be called: | ||
| - | |||
| - | <code java> | ||
| - | import de.grogra.pf.boot.Main; | ||
| - | |||
| - | public void sayHi(){ | ||
| - | println(" | ||
| - | } | ||
| - | |||
| - | </ | ||
| - | |||
| - | This works with multiple parameters and is especially useful in the [[01_user_documentation: | ||
| - | |||
| - | <code java> | ||
| - | import de.grogra.pf.boot.Main; | ||
| - | protected void startup() | ||
| - | { | ||
| - | super.startup(); | ||
| - | if (Main.getProperty(" | ||
| - | { | ||
| - | runLater(null); | ||
| - | } | ||
| - | } | ||
| - | |||
| - | |||
| - | protected void run(Object info) | ||
| - | { | ||
| - | println(" | ||
| - | } | ||
| - | </ | ||
| - | |||
| - | This provides the possibility to forward knowledge/ | ||
| - | |||
| - | |||
02_user_tutorials/08_technical_features/xparametric-model.1737730317.txt.gz · Last modified: 2025/01/24 15:51 by tim2
