¿ªÔÆÌåÓý

Locked Creating new button shapes for sensors to be placed on a Layout Panel


 

I am building a Layout Panel which will have buttons on it for route setting - obviously to be linked to sensors controlling Logix for turnout/signal setting.? I would like to have different button shapes for different purposes.? At the moment they all look the same, and things are getting crowded with labels trying to identify which does what.

I have tried searching this group but not found anything (though that may mean bad search terms!) and a friend has pointed me at?.? I have tried to understand it and failed abysmally.

Is there a simple "idiots guide" somewhere, or is one of you prepared to give me some hints/refer me to a tutorial or whatever please very nicely.

Iain


 

Iain,

Are you doing a Control Panel Editor / Panel Editor panel or a Layout Editor panel?

The general process is to create the custom icons using a graphics tool such as Gimp. For sensor icons, you will need icons for Unknown, Inconsistent, Inactive and Active (you could use a dummy one for Unknown and Inconsistent). They all need to have the same size so that they don¡¯t jump around when the state changes.

The icons will be stored at your user files location in a resources directory. I use "resources/icons". Use "Help >> Locations" to find the path to your ¡°user files location¡±. Don¡¯t put them in the JMRI install location.

When the sensor is added to the panel, the icon is changed to the custom one.

An alternate approach is changing the icon on the panel to text using the right click context menu. I use this approach to create ¡°<<¡° and ¡°>>¡± NX sensors.

Dave Sand

On Oct 29, 2018, at 8:00 AM, Iain <iain@...> wrote:

I am building a Layout Panel which will have buttons on it for route setting - obviously to be linked to sensors controlling Logix for turnout/signal setting. I would like to have different button shapes for different purposes. At the moment they all look the same, and things are getting crowded with labels trying to identify which does what.

I have tried searching this group but not found anything (though that may mean bad search terms!) and a friend has pointed me at . I have tried to understand it and failed abysmally.

Is there a simple "idiots guide" somewhere, or is one of you prepared to give me some hints/refer me to a tutorial or whatever please very nicely.

Iain


 

David,

Thanks for the response.? I am building a Layout Editor Panel.? I am used to entering sensors onto the panel, and clicking on them to cause changes - I have several route controlling Logix, I find them easier to understand than Route and LRoute.

I looked at NX and didn't understand that either (I understand the principle!) and my layout is a small BLT with a 4 line fiddle yard so NX is probably overkill.

I have just tried your change to text suggestion and it certainly works.? My sensor names are just too darned long - but I see the idea of << and >>, can I change my text or must it be the name of the sensor?.

I have located my user files as suggested.? Are you saying put a directory called "resources" in there with a sub directory of "icons"?

What file type must the new icons be?? And what size?? I don't have GIMP but I have other drawing programs.


 

Iain,

After a sensor has been changed to text, the text values can be anything you want. I use the right click context menu Properties item to open a dialog box that simplifies changing all of the properties instead of lots of menu clicks.

I use resources/icons because it matches the top level of the JMRI install, but it is not required.

Custom icons are generally gif or png. The size is totally up to you.

Dave Sand

On Oct 29, 2018, at 10:13 AM, Iain <iain@...> wrote:

David,

Thanks for the response. I am building a Layout Editor Panel. I am used to entering sensors onto the panel, and clicking on them to cause changes - I have several route controlling Logix, I find them easier to understand than Route and LRoute.

I looked at NX and didn't understand that either (I understand the principle!) and my layout is a small BLT with a 4 line fiddle yard so NX is probably overkill.

I have just tried your change to text suggestion and it certainly works. My sensor names are just too darned long - but I see the idea of << and >>, can I change my text or must it be the name of the sensor?.

I have located my user files as suggested. Are you saying put a directory called "resources" in there with a sub directory of "icons"?

What file type must the new icons be? And what size? I don't have GIMP but I have other drawing programs.


 

Look here
It helped me a lot.

--
Petr ?¨ªdlo
Czech Republic


 

On Mon, Oct 29, 2018 at 05:18 PM, Dave Sand wrote:
Iain,

After a sensor has been changed to text, the text values can be anything you want. I use the right click context menu Properties item to open a dialog box that simplifies changing all of the properties instead of lots of menu clicks.

I use resources/icons because it matches the top level of the JMRI install, but it is not required.

Custom icons are generally gif or png. The size is totally up to you.

Dave Sand



On Oct 29, 2018, at 10:13 AM, Iain <iain@...> wrote:

David,

Thanks for the response. I am building a Layout Editor Panel. I am used to entering sensors onto the panel, and clicking on them to cause changes - I have several route controlling Logix, I find them easier to understand than Route and LRoute.

I looked at NX and didn't understand that either (I understand the principle!) and my layout is a small BLT with a 4 line fiddle yard so NX is probably overkill.

I have just tried your change to text suggestion and it certainly works. My sensor names are just too darned long - but I see the idea of << and >>, can I change my text or must it be the name of the sensor?.

I have located my user files as suggested. Are you saying put a directory called "resources" in there with a sub directory of "icons"?

What file type must the new icons be? And what size? I don't have GIMP but I have other drawing programs.
I am not getting my problem described clearly, so my apologies.? I am running under Windows 10.? I am using Layout Editor.? None of the instructions on the JMRI pages on Icons which mention such things as Icon Editors seem to be available to me.? Where ARE these things accessible from?? All I have directly available are PanelPro and DecoderPro icons on my desktop which bring up that software.

I have found some files of additional icons such as here?? which are on my computer but in the "programs" area.? I could just copy these files I guess into the place you suggest - but how then do I get those buttons picked up for use?


 

Iain,

To change a sensor icon on a layout editor panel, right click on the icon and select "Edit Sensor Icon¡­" from the context menu. A dialog window will open; select "Change Icon¡­¡±.

The lower part of the dialog will change with two columns.

The Catalogs column with have two entries: Program Directory and Preferences Directory. The first one maps to the JMRI install location, ¡°resources" directory. The second one maps to the user files location, ¡°resources¡± directory. I was wrong before. Custom icons need to be in the resources directory or a sub-directory.

Navigate in the directory section and select the desired directory. The right column will be filled with the available icons. Drag the appropriate icons to the 4 existing icons at the top. When the changes are done, select Update Panel.

If you want to use an existing program installed icon, you do not need to copy them to the user files location. You only need to use the user files location for custom icons.

Dave Sand

On Oct 29, 2018, at 3:45 PM, Iain <iain@...> wrote:

On Mon, Oct 29, 2018 at 05:18 PM, Dave Sand wrote:
Iain,

After a sensor has been changed to text, the text values can be anything you want. I use the right click context menu Properties item to open a dialog box that simplifies changing all of the properties instead of lots of menu clicks.

I use resources/icons because it matches the top level of the JMRI install, but it is not required.

Custom icons are generally gif or png. The size is totally up to you.

Dave Sand



On Oct 29, 2018, at 10:13 AM, Iain <iain@...> wrote:

David,

Thanks for the response. I am building a Layout Editor Panel. I am used to entering sensors onto the panel, and clicking on them to cause changes - I have several route controlling Logix, I find them easier to understand than Route and LRoute.

I looked at NX and didn't understand that either (I understand the principle!) and my layout is a small BLT with a 4 line fiddle yard so NX is probably overkill.

I have just tried your change to text suggestion and it certainly works. My sensor names are just too darned long - but I see the idea of << and >>, can I change my text or must it be the name of the sensor?.

I have located my user files as suggested. Are you saying put a directory called "resources" in there with a sub directory of "icons"?

What file type must the new icons be? And what size? I don't have GIMP but I have other drawing programs.
I am not getting my problem described clearly, so my apologies. I am running under Windows 10. I am using Layout Editor. None of the instructions on the JMRI pages on Icons which mention such things as Icon Editors seem to be available to me. Where ARE these things accessible from? All I have directly available are PanelPro and DecoderPro icons on my desktop which bring up that software.

I have found some files of additional icons such as here which are on my computer but in the "programs" area. I could just copy these files I guess into the place you suggest - but how then do I get those buttons picked up for use?


 

Thank you for that.? Sadly that isn't exactly what happens on my Win 10 system.? The window that gets opened is so small that I didn't see the things you (and the documents) were talking about.? When I open the window up all appears clearly and I have managed a simple change (using the squares) just for a test.

Since I will want a lot of these, presumably building my own catalogue as described in??is what I will need to set up several groups of 4 related images.? It is not clear to me how I will access them when I have done that?