Eneroth Railroad Extension Testing

This is by no means an urgent problem, and you might be wondering why I’m fiddling with an extension that apparently hasn’t been touched since 2015. It’s called the Eneroth Railroad System (Eneroth Railroad System | SketchUcation), an extension where you draw train tracks and animate trains on them, and it’s one of the greatest SketchUp extensions I’ve come across. I’ve tried to learn everything about it. From what I gather, it works really well. However, there are a couple of bugs, but none so serious as to impair the functionality and stability of my models.


(DRG Class 01 by Julia Eneroth. If you look closely, the animation is a tiny bit choppy, and it seems to take barely noticeable, but prevalent pauses every quarter-second or so. With more geometry in the model, the pauses are longer and can be slightly annoying to watch. It doesn’t do this with every model, but I’m trying to figure out what the trend is)

So, in exploring this extension, I noticed one odd thing, in particular. On occasion, this message would appear in the ruby console:

I’m not sure how this impacts the model, but it seems to be referencing a file in the extension folder called “animate.rb”. (I don’t know how much it’ll help, but I can upload the file too).

animate.rb (8.0 KB)

I unfortunately do not know enough about ruby to understand the issue in its entirety, but the console is telling me that no method is defined for “invalidate” in the file. Also, for several minutes, it’ll keep copying and pasting the same error message several times per second within the console before I quit and restart SketchUp, (Make version 2017) The problem seems to disappear when I do so, but it eventually comes back.

Any thoughts?

The only #invalidate method is on the view object.

It actually is telling you that no method named invalidate is defined for the nil object (which is the singleton instance of the NilClass.)

It also tells you the error occurred on line 165 in the method named "go=".

So what happens is that a reference is supposed to be pointing at the model’s view object (likely from the return from a method call,) but instead gets nil returned to it.

This is normal in Ruby for a failure during a lookup method call.

The weird thing is that line 165 is …

 @model.active_view.invalidate

How the model’s active view returns nil is beyond me.

Hmmm… you are on Mac. Do you have another model open at the same time (or shortly before) this error occurs ? If somehow the @model reference got to pointing at another model object, then strange things could happen.

If so, … I’d suggest not switching model documents whilst the animation tool is active.

I don’t know why the Ruby error occurs, but the stuttering might disappear if you go to Extensions > Eneroth Railroad System > Advanced Animation Settings and untick Auto adjust Δt.

Here’s a crocodile for those who are interested ene_SBB_Ce_68_II.zip (275.8 KB)

1 Like

Thank you both for your insight. I greatly appreciate it. Unticking Auto adjust ∆t did fix the issue.

Also, the SBB Ce 6/8 II is wonderful. I would never have thought to make the articulating segments in a locomotive separate rolling stocks.

@eneroth3 What exactly does this warning dialog mean?


The code I entered doesn’t look harmful, and what would happen if I executed code that actually was harmful in some way?

This code isn’t harmful but it’s hard for the extension to know. Actually harmful code could delete files and do other nasty stuff.

Alright. That rules out being the cause of having balise points copying over into several of my SketchUp models…
Thanks again.

Here’s a refurbished bathtub for anyone interested. :wink: ene_SJ_Da.zip (575.0 KB)

1 Like