trevor Posted September 13, 2016 Posted September 13, 2016 I'm trying to show some information in a label that combines several variables...How do I combine text values?
Henry Posted September 13, 2016 Posted September 13, 2016 At the time, you cannot unite two text variables to one new string. Use instead two (or more) labels next to each other to show the information. Zur Zeit kannst Du nicht zwei Textvariablen zu einer neuen Zeichenfolge vereinigen. Benutze stattdessen zwei (oder mehr) nebeneinander angeordnete Beschriftungen um die Informationen zu zeigen. Henry
trevor Posted September 14, 2016 Author Posted September 14, 2016 17 hours ago, Henry said: At the time, you cannot unite two text variables to one new string. Use instead two (or more) labels next to each other to show the information. Zur Zeit kannst Du nicht zwei Textvariablen zu einer neuen Zeichenfolge vereinigen. Benutze stattdessen zwei (oder mehr) nebeneinander angeordnete Beschriftungen um die Informationen zu zeigen. Henry I hope you are going to add this feature, the OTHER reason I'd like to do this is to combine variables to POINT at an object. e.g. "Track_" & Variable
Curt84328 Posted September 14, 2016 Posted September 14, 2016 can you give us some specific examples of why you want to combine 2 variables.
trevor Posted September 15, 2016 Author Posted September 15, 2016 Specifically at the moment.. I want to lookup a NEXT action for a train when it enters a track section. Obviously I need to use the track section ID but I would also need to combine the entry direction into the track AND the direction of the locomotive itself (i.e is it reversing)
Curt84328 Posted September 15, 2016 Posted September 15, 2016 this might work, since a label only tells the user something and does nothing else you use more than one label. name and speed.mbp
trevor Posted September 16, 2016 Author Posted September 16, 2016 (edited) 14 hours ago, Curt84328 said: this might work, since a label only tells the user something and does nothing else you use more than one label. name and speed.mbp Not really what I am looking for though Curt, I want to create a single variable name from a fixed set of conditions to reference some other variable or object. e.g. On a track section I know the Train_Name (Say "Coal_Train") , I can lookup the train speed so I know if it is going forwards or backwards, and I can tell by the track events if it is moving say East or West, So I want to lookup a variable list with the name "Coal_Train_Forwards_East", "Coal_Train_Forwards_West" etc. Ability to create simple FUNCTIONS would be great too... something like this. Edited September 16, 2016 by trevor
BahnLand Posted September 16, 2016 Posted September 16, 2016 Hello Trevor, may be, that "object variables" can help you: In contrast to normal variables, which are identified by an arbitrary name, object variables are assigned to a specific object (e.g. a locomotive) and then referred by objectName.variableName. See the example below: Defining an object variable "by hand", mark he object (in the example above the locomotive) and select the object variable editor by a click to the icon surrounded with a red circle. The definition window for variables to be assigned to the marked object will be opened. Here, you can specify the variables and assign values. You can find already defined variables in the event control window after you have selected the link "Active timers and variables" at the right bottom corner. You can manipulate the object variables also here. Using the event control environment for manipulating and evaluating object variables, handle them analogously to normal variables with the difference, the object variables are referred by the syntax already shown above: "objectname.variablename". Many greetings BahnLand
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now