# Ruby: For Dummies - Programmatically Activating Dynamic Components

**URL:** <https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676>\
**Category:** Dynamic Components\
**Tags:** sketchup, ruby, components\
**Created:** [September 11, 2018, 9:21pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676 "2018-09-11T21:21:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon72365415](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@anon72365415](https://forums.sketchup.com/u/anon72365415)\
**Post date:** [September 11, 2018, 9:21pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/1 "2018-09-11T21:21:21Z")

</div>

It has been a bit since I have made a post, but this is a question that I’ve had for an incredibly long time. I was wondering if it is at all possible to activate a dynamic component programmatically, or through the Ruby Console with a command. I am asking because I am by no means a developer on any circumstances (yet). I am using a plugin called the Eneroth Railroad System (and whomever is to find this, I know that I am using a somewhat faulty animation plugin that is several years old), and one of the features are “balise points”. They are points that are placed on a path (track) that when an object (train) moves over this point along the path (track), the ruby code written in the console is activated, doing something (I hope this is how that works).

---

<div class="post-metadata">

**Author:** ![sjdorst](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/sjdorst/32/13212_2.png) [@sjdorst](https://forums.sketchup.com/u/sjdorst)\
**Post date:** [September 11, 2018, 10:20pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/2 "2018-09-11T22:20:34Z")

</div>

Tag @eneroth3, your It!

---

<div class="post-metadata">

**Author:** ![anon72365415](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@anon72365415](https://forums.sketchup.com/u/anon72365415)\
**Post date:** [September 11, 2018, 10:52pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/3 "2018-09-11T22:52:47Z")

</div>

> [@sjdorst](#):
>
> Tag @eneroth3, your It!

Honestly, this is quite a disappointing response, and another reason I asked was that Eneroth3 has said that she hasn’t done much with Dynamic Components. Alas, I will do so.

---

<div class="post-metadata">

**Author:** ![sjdorst](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/sjdorst/32/13212_2.png) [@sjdorst](https://forums.sketchup.com/u/sjdorst)\
**Post date:** [September 12, 2018, 12:33pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/4 "2018-09-12T12:33:56Z")

</div>

All I was trying to do was draw Eneroth’s attention to this post as you mentioned her railroad system. And thought that “Tag … you’re it!” was a playful way to do it.

In what way is that disappointing?

---

<div class="post-metadata">

**Author:** ![slbaumgartner](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/slbaumgartner/32/7302_2.png) [@slbaumgartner](https://forums.sketchup.com/u/slbaumgartner)\
**Post date:** [September 12, 2018, 12:46pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/5 "2018-09-12T12:46:37Z")

</div>

Your disappointment sounds like you haven’t understood that most extensions and most replies on this forum are the work of private individual volunteers, not Trimble employees. When an extension misbehaves the best way to deal with the issue is to contact the author, which is what @sjdorst did by linking eneroth3.

---

<div class="post-metadata">

**Author:** ![eneroth3](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/eneroth3/32/1222_2.png) [@eneroth3](https://forums.sketchup.com/u/eneroth3)\
**Post date:** [September 12, 2018, 2:29pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/6 "2018-09-12T14:29:31Z")

</div>

I suspect there is a way to use Ruby to simulate a DC being interacted with using the Interact Tool, if that is what you are after.

However I’d recommend against building around DCs as it is a quite low quality and outdated plugin, without a public API. It is much because people insist on building their own Ruby project around DCs that DCs cannot be properly refactored and updated by Trimble if I’ve understood right.

---

<div class="post-metadata">

**Author:** ![anon72365415](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@anon72365415](https://forums.sketchup.com/u/anon72365415)\
**Post date:** [September 12, 2018, 3:29pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/7 "2018-09-12T15:29:21Z")

</div>

I apologize for my perceived belligerence. I now understand the pun you made…

---

<div class="post-metadata">

**Author:** ![anon72365415](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@anon72365415](https://forums.sketchup.com/u/anon72365415)\
**Post date:** [September 12, 2018, 3:34pm UTC](https://forums.sketchup.com/t/ruby-for-dummies-programmatically-activating-dynamic-components/76676/8 "2018-09-12T15:34:40Z")

</div>

> [@eneroth3](#):
>
> I suspect there is a way to use Ruby to simulate a DC being interacted with using the Interact Tool, if that is what you are after.

This is exactly what I am after, but I don’t really know how to use the API to my benefit, because I have 0 experience when it comes to computer programming. My question, to me, seems unanswerable at the moment ☹.
