10._create_a_new_module_in_capsis_called_training
The Capsis training online
10. Create a new module in Capsis called training
Purpose: use the ant create-module
tool to automatically create a new module in Capsis for this exercise session
Tutorial:
- open a terminal, use
cd
to move in directories
- move to the
practice/capsis4/
directory. This is the Capsis installation directory, all commands below must be typed from here.
- type and adapt this command before validating (you may keep
training
andTra
and adapt the 2 others):
// For Windows:
ant create-module -Dname=training -Dprefix=Tra -Dauthor=F._de_Coligny -Dinstitute=INRAE
// For Linux/MacOS:
sh ant create-module -Dname=training -Dprefix=Tra -Dauthor=F._de_Coligny -Dinstitute=INRAE
- open in an editor (e.g. Textpad, Gedit…) the file
capsis4/etc/capsis.models
and check the file contains a new entry for your module
- customise the file
idcard.properties
localised incapsis4/src/training/
, type and description may be changed freely, do not change the rest
- compile Capsis, including your new module with
ant compile
, we are expecting a finalBUILD SUCCESSFUL
:
// Windows: capsis4> ant compile // Linux/MacOSX: capsis4> sh ant compile
- run Capsis to check the new module
// Windows: capsis4> capsis // Linux/MacOSX: capsis4> sh capsis.sh
- in Capsis, go to the Help menu, then select About Capsis and select Training in the list. You can see informations about the Training module
- test the new module under Capsis…
- Project > New, then choose the Training module and click on the Initialize button.
- load an input file:
capsis4/data/training/training.inv
orcapsis4/data/template/template.inv
(if I removed training.inv by mistake - or load a file created during the Java exercises session:
trees.txt
- Click Ok → the initial scene is built and the project appears with its root Step
- On the left panel of the Capsis main frame, searxh the viewer Called
2D Viewer
and double-click it to open it on the current simulation Step
10._create_a_new_module_in_capsis_called_training.txt · Last modified: 2021/12/13 09:28 by 127.0.0.1