![]() If you are running it from the app/extensions/shell folder in the NetLogo installation, you can simply enter "make". The Makefile included in this package can be used to create the shell.jar file from the java source file. ![]() InstallingĬheck out the extension manager to install the Shell extension from within the NetLogo application.įor more information about NetLogo extensions in general, see the NetLogo User Manual. Shell:setenv and shell:cd thus work only within the shell extension and are in the service of shell:exec and shell:fork, which do inherit their environment and working directory from the extension's. That is done with NetLogo's set-current-directory command. It does not change the working directory for NetLogo itself. Changing the extension's working directory with shell:cd changes the working directory for the extension only. Similarly, the working directory for the shell extension is initially set to the directory in which the NetLogo model is located. HOWEVER, any environment variable set by shell:setenv is local to the shell extension only and will disappear when the NetLogo session is ended. That makes shell:getenv very useful for passing the values of ennvironment variables on to NetLogo. ![]() The shell extension inherits all the environment variables that were in place when NetLogo was started. for NetLogo 6.1: You can use the extension manager to install the Shell extension from within NetLogo.shell:reset => clears any environment variables set by shell:setenv and returns the working directory to the NetLogo model directory.) => execute command asynchronously and discard the results ) => execute command synchronously and report a string of the results it prints to stdout shell:setenv => sets environment variable.shell:getenv => reports value of environment variable.shell:cd => change current working directory (relative to current directory unless begins with a drive letter on Windows or a forward slash on Mac/Unix).shell:pwd => reports current working directory.(Windows) observer> show (shell:exec "cmd" "/c" "dir") This package contains the NetLogo shell extension.
0 Comments
Leave a Reply. |