Jump to content

trevor

Mitglieder
  • Gesamte Inhalte

    264
  • Benutzer seit

  • Letzter Besuch

Alle erstellten Inhalte von trevor

  1. I tried that out.. though it was a bit hard to follow... it IS an interesting approach... I'm not too keen on my panels moving all over space and time though LOL Perhaps a picture in picture single window with a custom camera might be a solution though.
  2. Hmmm.. interesting Thanks
  3. OK we can create groups which is great and even attach variables to them which is also great. However, if you need to change the grouping you need to ungroup, select what you want in the new group, and then make a new group. All the variables you had attached to the initial group are of course lost. As such it would be nice if we could add and remove things from an existing group. Attached is the Visio menu for doing just that. The way they do it: If u click on a group, it selects en-mass just at you do. If you then click on an item(s) inside the group, those select instead with a slightly different hi-light. The "Remove From Group" menu item is enabled at that point. Clicking it removes the item(s) from the group. If u select a group AND an item(s) outside the group, the "Add to Group" menu choice is activated. Clicking it adds the selected items to the group selected. T
  4. It would be a nice if you could add some multi-selection editing tools to align, space and rotate the objects in a selected group. Note this differs from moving and rotating things as a group of selections, since the actions here happen on every item in the selection individually. The attached image is the menu from VISIO, you would need to make it align X, Y and add Z since left and top are not appropriate for three dimensions. The bring forward / back menu picks might come in useful in 2D mode too.
  5. I have no doubt this has been asked for before, but just in case... Would it be possible to add another view window (or multiples). In particular it would be nice to make a control panel static relative to the main view. For those of us lucky enough to have multiple monitors, making the 2nd view a floating window would be fantastic. Regards T
  6. Cool just as my testing figured out... I can understand the reason for the snapshot.. especially at the initial condition level, not so much at the other conditions level though. Infinite loops are always a possibility either way... Have you ever written a handler called by a controller switch set and have the handler clear the switch when it's done, run it and realize you accidentally set the initial condition to ANY STATE... LOL... Thank you for the task manager Bill Gates... LOL
  7. Hi Curt, you are close The $ is used to tell the program that the value following is a name, or pointer, to a different value... For example if you have variable_1 and Variable_2 and you want to set variable_2 to whatever variable_1 contains You need to enter the term $Variable_1 to tell the handler to use the entry as a pointer to the actual value, not the literal string "Variable_1" example: Variable_1 contains value 10, Variable_2 initially empty Setting Value of variable 2 WITHOUT the $ will make Variable two say "Variable_1" With the $, Variable_2 will become the value 10 It does get confusing though if you are using variables to point at other variables and objects. Mud? The dot notation is only partly true. You can in fact create variables with dots in the name either globally or on an object as seen in the attached image. It's not a great idea to do so, but there is nothing to stop you. Bracketing offers the real control. As you say, the underscore notation is typically used for system variables, but again you can use this notation also. I tend to use this notation for any variables I create on objects dynamically in the event manager to distinguish them from the ones I need to set manually. Be aware _Trigger1 and _Trigger2 are not really system variables. Those are two variables that are created on the fly as entry conditions for each event. They have no scope or existence outside that particular event. In most cases the triggers are pointer to something else, e.g. a track or a switch or whatever else is related to the event. So yes the triggers usually have sub-properties. You can use this to your advantage if you set variables in the objects. For example if you add say Position as a variable to a locomotive, and use the train enters track (any locomotive) event, you can set the _Trigger1.Position = $_Trigger2. So now the locomotive that entered the track has a property on it that points at the test track it entered last. Note this means variables are not limited to being just values. You can set a variable to be another object. (Well.. really the NAME of another object.) I believe you already did this with a camera pointer. However, if you use that feature make sure all your objects that you intend to reference that way have unique names. If you do not, it will always reference the oldest object with that name on your layout. The bracketing notation takes that whole thing a step further effectively giving you pointers to pointers to pointers .... to a value or object. As is, the bracketing seems kind of pointless. You would think you could use the dot notation on it's own, but, and I am guessing here, because you can have dots in names that was not possible.
  8. Sorry that this is in English only, I'd Google translate it, but I am sure the results would be less that satisfactory. Perhaps someone can translate it for me if you think it is worth sharing. The event manager is a bit odd in the way that it works. So much so I thought I’d share some of my findings in case it might help other uses. First, the whole application runs on kind of clock. (Though clock might simply mean cycle time.) From my experiment it appears that the simulation is advanced one “frame”, whatever that is, at which point a snap-shot of the current state seems to be used to test and run the events listed in the event manager. I tested this by running two parallel events, one long, one short. Each one repeated 1000 times. Each event chain had an associated locomotive that ran down a track while the events were running. To my surprise, both trains always ended at almost exactly the same spot despite the difference in event commands. When I timed the completion of the events I noticed it was pretty much 1000/(frame rate). Second, the amount of stuff actively happening in events can slow down the frame rate. Since the events are run between each move of the simulation, if the amount of code running for an event is large, it can exceed the allotted time window for normal simulation. The frame rate will be reduced or trains may appear to hesitate. Third, event conditions, both primary and secondary are always based on the state of the simulation at THE START of the event cycle. That is, if you test for a variable value or switch state, change that value and then try to use that new value in a subsequent TEST in the same event, the new value will NOT be used in the conditions logic. This one is a little irritating. If you want to use that new value in a test, you end up having to generate a new event which will be tested in a future event cycle. Note on the latter, when you make changes, the underlying values ARE propagated down the event chain. For example you can increment a variable in one event condition and multiply that new value in the next and the final result of the variable will be as you expect. You just cannot test for that new value. Finally, beware of races. Great care and forethought needs to be used when generating more complex event chains that can be started by more than one object on the layout. There is no built in method to propagate and maintain the underlying source of the event. If event handlers for two objects toggle a variable, switch etc. handled by a different event, at or close to the same time, the results may not be as you expect. In some cases you need to resort to setting a different unique object and then activating a common handler that goes to look through a group of those objects for the one, or more, that is primed. I hope this helps you. If I am mistaken on one or more points I am sure Neo will correct me.
  9. NOTE: Implementing the latter would also provide us with a crude, but much needed method to implement arrays of variables.
  10. Great work on all of them Neo. Thanks. I have however noticed this one pops up regardless of whether you changed anything or not. But it has already saved me a lot of time... I have accidentally cancelled the EV after making a LOT of changes on several occasions. DOH !
  11. It would be nice if you could add a new trapped event to the EV called User_Event with an attendant action called Raise_User_Event. The latter giving you the flexibility to define the _Trigger1 and Trigger2 variables that get passed with the event. Currently the only way to do that with passed variables is to flip some object with the variables attached. (A controller switch for example.) However, that method has some significant variable synchronizing issues if the switch is being used by more than one thing.
  12. Yup I noticed THANKYOU, THANKYOU, THANKYOU.
  13. It might be that I am missing something, but..... The event handler allows you to enter User-Defined names / variable chains to specify most objects. However, the setting of points. signals, controllers etc only give you the choice of a fixed list of values..... This is problematic if you want to set the state based on a variable value. You can get the current state using the _Sate property, but that appears to be read only. I am trying to set a collection of track switches to an appropriate state based on a predefined route through them. As a work around, I have had to set up 4 variables per switch per route, Set_0,Set_1,Set_2, Set_3.. and have four separate event handlers to do all of each type for each switch. That ends up being a lot of duplicated code and variable definitions to set up and maintain. I realize the EV is old and needs a lot of work, but little changes like this can make a big difference to usability. Sorry if I am starting to be a pain...
  14. Neo can u put together a better cheat sheet that explains the naming conventions with brackets and $s. I keep finding I'm lost for when to use what. The help page is a bit slim on examples and $ usage seems to vary depending on the function in question. Also, it would be really helpful if you could expand the bracket functionality to be nested..... e.g. $((Var1).(Var2)).Property OR even better $((Var1).State_(Var2)) So we can have something like Var1 = Locomotive Name Var2 = Index to a list of variables whose name starts with "State_" example in the second suggestion. Var1 = BR_50-1 Var2 = 2 Would point at $BR_50-1.State_2
  15. trevor

    Labels

    Maybe simply add a NEW label type, or even two new label types.. Label Left, and Label Right
  16. Then again, what I was seeing may have been more to do with the slowness of the events handler before you fixed the name lookup lag issue. However, using the spinning train method also provides me with the additional benefit of being able to attach variables to the timer
  17. I was running a timer to hold a train at a station for 30 seconds.. It seemed to still be 30s at the faster run rates... but that was a while ago so I may be mistaken.
  18. IF you have not already noticed, when the simulation rate is set to one of the faster rates everything moves faster but any timer you may be using to pause a train at a station or wherever still runs are the same time. To correct for this I am using a tick-clock generated by a small circular section of track with an engine running round and round. With a circle radius of 95.5 and an engine speed of 600 mm/s, you can use the train enters track event from the small section to generate a one simulation second clock. Wenn Sie nicht bereits bemerkt haben, wenn die Simulationsrate zu einer der schnelleren Raten eingestellt wird, bewegt sich alles schneller. Allerdings sind nicht die Timer. Zur Korrektur dieses ich eine Zecke Uhr durch einen kleinen kreisförmigen Abschnitt der Strecke mit einem Motor läuft rund und rund erzeugt verwende. Mit einem Kreisradius von 95,5 und einer Motordrehzahl von 600 mm / s, mit dem Zug betritt-Track-Event. Er erzeugt einen 1s-Timer.
  19. Still pretty amazing what you can make the current EV do though.. if u know what you are doing Test_22.mbp
  20. Sounds good, thanks for the heads up
  21. Any idea how future "future" is Neo ? I mean, should I hold of on programming with the current EV and wait a month or two, or is this a long term thing?
  22. Hello EASY, Yes I saw that plug-in. I'm trying to avoid using simulation plug-ins though for portability reasons. I can't imagine why the native properties like that are not all available as a variable.
  23. I agree. However, it is generally bad practice to use global variables if you do not have to. On a simple layout you might get away with it, but the more things you have happening the more opportunity there is for multiple objects to be referencing the same variable at the same time with unpredictable results.
  24. Is there a way to set the coordinates of an object as a variable in an event ?. In particular I would like to set the Z rotation of something.
  25. Yes. Sorry. It is a bad habit. I corrected it I will try and make my sentences as clean as I can to help with the translations too.
×
×
  • Neu erstellen...