CMD Open *with* GUI

33 views
Skip to first unread message

Randall Boone

unread,
Sep 26, 2023, 3:11:09 PM9/26/23
to netlogo-users
Folks,

I have a need to open a NetLogo model from the command line and retain the GUI.  Much of the advice on the web is about running headless, but that isn't the need here (at least as of yet). 

In NetLogo 2 I found there was essentially:
C:\Program Files\NetLogo\NetLogo.exe --open "My_Model.nlogo" 
and it would start the model.  

It seems that functionality is not in place in NetLogo 6.2.   I have tested --model as well.   Any other suggestions?

Thank you,
Randy

Jeremy Baker

unread,
Sep 27, 2023, 10:54:10 AM9/27/23
to Randall Boone, netlogo-users
Randy, 

Thanks for your interest in NetLogo.

In NetLogo 6.3, you can just provide the model path as the first argument, no switches required (make sure to use double quotes if there are spaces):

./NetLogo "./models/Code Examples/Many Regions Example.nlogo"

In Windows it might be more like this:

NetLogo.exe "models\Code Examples\Many Regions Example.nlogo"

You do want to run the executable from the NetLogo install directory to get the working path set there, as NetLogo will assume certain paths for the models library and extensions (`cd "C:\Program FIles\NetLogo 6.3.0\"`, or whatever you've got it at).

Let me know if you still have trouble with it.

-Jeremy


From: netlog...@googlegroups.com <netlog...@googlegroups.com> on behalf of Randall Boone <rboon...@gmail.com>
Sent: Tuesday, September 26, 2023 2:11 PM
To: netlogo-users <netlog...@googlegroups.com>
Subject: [netlogo-users] CMD Open *with* GUI
 
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/58dadf0b-0bfe-4ee5-bc39-e1c878d3f13an%40googlegroups.com.

Randall Boone

unread,
Sep 27, 2023, 12:06:26 PM9/27/23
to netlogo-users
Ah, the last bit is what I was missing.  Errors were being thrown when I tried from the model's folder.

Thank you, Jeremy.

Randy

Randall Boone

unread,
Sep 29, 2023, 10:21:51 AM9/29/23
to netlogo-users
Is this type of execution not possible?
Reply all
Reply to author
Forward
0 new messages