How to change a module icon from .ini file?

117 views
Skip to first unread message

amrcg

unread,
Sep 15, 2021, 10:30:14 AM9/15/21
to OMNeT++ Users
This is probably a silly question. 
I want to change the icon associated with the AODVRouter to a new one in one specific scenario, in INETMANET. As such, I have tried:

**.host*.display-string = "i=../examples/SGF/smeter.png"

But it doesn't work, though the icon is placed precisely at inetmanet-4.x-master/examples/SGF/smeter.png. 
What is the correct way of doing this? Thank you in advance.

Regards,
António Grilo

Rudolf Hornig

unread,
Sep 16, 2021, 5:37:34 AM9/16/21
to OMNeT++ Users
1. note that *.display-string= "xxx" works only in OMNeT++ 6 pre11 or later.
2. The icon name in the i= tag is not a filename/path relative to the current directory. That is an ICON NAME so you should not specify the .png extension. You cannot use relative path over there either. You MUST specify the icon name (with possible subdirectories) but ONLY if that image directory is in the OMNETPP_IMAGE_PATH envir variable. Or you MUST path the image path as a command line parameter during simulation start:

--image-path=$INET_ROOT/examples

or place your image in the INET_ROOT/images directory as that is automatically added to the image path (as long as you run the INET's setenv script)
Reply all
Reply to author
Forward
0 new messages