¿ªÔÆÌåÓý

Locked Layout editor and block numbering problems


 


If I open the block table and select the 'Add' button I can then add 1 or more blocks. ?If I specify a block system name ?(e.g. IB1 ) and check 'Add a sequential range' I get blocks generated with system names of IB1, IB1:1 IB1:2 and so on. ?If I then edit a track segment on using the layout editor using the edit option on the segment's popup menu and select one of the 'IBx:y' system names as the block name for the block and hit 'Done' the dialogue doesn't close and the system log shows a null pointer exception. ?Conversely if I use the layout editor to create a new track segment and select one of the 'IBx:y' system names in the Block Name: drop down list *(e.g. IB1:3) a new track segment is created OK and assigned to newly created block with 'IB1:3' as the user name, so I now have two different blocks, one with IB1:3 as ?the system name and one with it as the user name. ?At the ?moment I suspect the easier approach is for me to generate a range of blocks with simple IB1, IB2, IB3 numbering manually.

I'm using version 4.13.2.

Regards

Paul


 

Paul,

For me, the easiest method is to never create a Block. When I am creating a Layout Editor panel, I assign a block ¡°user" name to the track component using the Edit context menu. If it is a new user name, the system will create the block automatically with the next available IBnnn.

Dave Sand

On Aug 12, 2018, at 11:56 AM, paul@... wrote:


If I open the block table and select the 'Add' button I can then add 1 or more blocks. If I specify a block system name (e.g. IB1 ) and check 'Add a sequential range' I get blocks generated with system names of IB1, IB1:1 IB1:2 and so on. If I then edit a track segment on using the layout editor using the edit option on the segment's popup menu and select one of the 'IBx:y' system names as the block name for the block and hit 'Done' the dialogue doesn't close and the system log shows a null pointer exception. Conversely if I use the layout editor to create a new track segment and select one of the 'IBx:y' system names in the Block Name: drop down list *(e.g. IB1:3) a new track segment is created OK and assigned to newly created block with 'IB1:3' as the user name, so I now have two different blocks, one with IB1:3 as the system name and one with it as the user name. At the moment I suspect the easier approach is for me to generate a range of blocks with simple IB1, IB2, IB3 numbering manually.

I'm using version 4.13.2.

Regards

Paul


 

Dave,

I've followed your procedure in the past, and it produces consistent results avoiding the problem I identified above. ?However for various reasons I decided to start describing the layout afresh. ?In terms of sensors and turnouts I've reassigned hardware addresses so the address and therefore the system name is directly related to the base board on which the component resides. ?I.e board 1 turnouts are Loconet LT1xx, board 2 turnouts are LT2xx and so on. ?The same applies to accessory address for signals and sensors etc. ?I thought I'd do the same for internally addressed items that have a physical location such as blocks which is when I hit the above problem. ?The idea behind this approach was to that I could employ user names to identify the item in terms of logical usage/location and system names for physical location.

Regards

Paul


 

Paul,

Your approach makes sense. That provides you with two ways of organizing the data.

I did some checking and discovered a bug in the track component Edit dialog. If a block does not have a user name, a null pointer exception will occur.

I will fix that before the next test release.

Dave Sand

On Aug 12, 2018, at 3:35 PM, paul@... wrote:

Dave,

I've followed your procedure in the past, and it produces consistent results avoiding the problem I identified above. However for various reasons I decided to start describing the layout afresh. In terms of sensors and turnouts I've reassigned hardware addresses so the address and therefore the system name is directly related to the base board on which the component resides. I.e board 1 turnouts are Loconet LT1xx, board 2 turnouts are LT2xx and so on. The same applies to accessory address for signals and sensors etc. I thought I'd do the same for internally addressed items that have a physical location such as blocks which is when I hit the above problem. The idea behind this approach was to that I could employ user names to identify the item in terms of logical usage/location and system names for physical location.

Regards

Paul


 

Hey Paul,
If you want to write up the 1st issue (at <I¡¯ll take a look at it ASAP.


 

On Sun, Aug 12, 2018 at 09:56 AM, <paul@...> wrote:
If I open the block table and select the 'Add' button I can then add 1 or more blocks. ?If I specify a block system name ?(e.g. IB1 ) and check 'Add a sequential range' I get blocks generated with system names of IB1, IB1:1 IB1:2 and so on. ?If I then edit a track segment on using the layout editor using the edit option on the segment's popup menu and select one of the 'IBx:y' system names as the block name for the block and hit 'Done' the dialogue doesn't close and the system log shows a null pointer exception.
This is the undefined user name problem mentioned by DaveS.

?Conversely if I use the layout editor to create a new track segment and select one of the 'IBx:y' system names in the Block Name: drop down list *(e.g. IB1:3)
Is this the "Block Name" combobox in the editor panel? Playing with this and looking at the code it appears that you have to select the block from the combobox before you create the track segment; if a block isn't selected here then the track segment a assigned to a new block with the next available system name and user names ("IBx" & "AUTOBLK:y").

a new track segment is created OK and assigned to newly created block with 'IB1:3' as the user name, so I now have two different blocks, one with IB1:3 as ?the system name and one with it as the user name. ?At the ?moment I suspect the easier approach is for me to generate a range of blocks with simple IB1, IB2, IB3 numbering manually.
I've never liked the colon separator that's added¡­ I'd prefer that autogenerated names pick the next (numerically) available names; for example: If I input IB3 and autogenerate three more they'd be IB4, IB5 and IB6.
Likewise for user names "Geo" becomes "Geo1", "Geo2" and "Geo3" or "Geo13" becomes "Geo13", "Geo14" and "Geo15" (skipping any names already used).

Thoughts? And¡­ discuss¡­ ;-)


 

I've just created ?PR #5639: Change "Add Block" sequential names algorithm


 

Hi George,

I'm happy to write up the 1st issue on GitHub, but I can't see PR #5639 and don't want to duplicate what you've done. ?
Is this the "Block Name" combobox in the editor panel?
Yes - The problem I was describing here is not what happens if you leave the combobox blank. ?It's what happens if you select a block by its 'IBx:y' format system name as autogenerated. ?Instead of getting the block you've selected when you create the layout editor component, you get a new block with an IBn system name and a user name of IB1:3 or whatever.
?I'd prefer that autogenerated names pick the next (numerically) available names; for example: If I input IB3 and autogenerate three more they'd be IB4, IB5 and IB6.
This seems sensible to me. ?It would mean that the system names generated by this method are the same as would be generated if you assign a user block name to track segment using the context menu as described by Dave above.

Regards

Paul