# Dynamic Component from a Ruby Script?

**URL:** <https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904>\
**Category:** Dynamic Components\
**Tags:** ruby, dynamiccomponents, ai\
**Created:** [September 14, 2024, 6:36am UTC](https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904 "2024-09-14T06:36:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsharp](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/gsharp/32/25083_2.png) [@gsharp](https://forums.sketchup.com/u/gsharp)\
**Post date:** [September 14, 2024, 6:36am UTC](https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904/1 "2024-09-14T06:36:57Z")

</div>

A very basic question… Can you create a dynamic component from a ruby script?

I am wondering if AI can create a ruby script (which it can provide the code) to create a dynamic component (which it an define the instructions) ?

---

<div class="post-metadata">

**Author:** ![TIG](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/tig/32/198_2.png) [@TIG](https://forums.sketchup.com/u/TIG)\
**Post date:** [September 14, 2024, 1:06pm UTC](https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904/2 "2024-09-14T13:06:31Z")

</div>

You can create a DC from Ruby - but it’d be complex and involve lots of attribute setting and editing etc.  
I don’t think AI will be advanced enough to do this for you - even with lots of help from your side.  
It will cannibalize bits of other scripts it finds on the net, and make a right mess, that you’ll have trouble debugging etc… I wouldn’t do it.

Try making a simple DC, coding it yourself, to see the complexity of what’s involved…

---

<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 14, 2024, 1:21pm UTC](https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904/3 "2024-09-14T13:21:00Z")

</div>

One aspect of the difficulty is that there is no published API or design for DCs. Everything we know has been reverse engineered over many years by users.

---

<div class="post-metadata">

**Author:** ![gsharp](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/gsharp/32/25083_2.png) [@gsharp](https://forums.sketchup.com/u/gsharp)\
**Post date:** [September 16, 2024, 5:20am UTC](https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904/4 "2024-09-16T05:20:18Z")

</div>

thanks for both your expert thoughts… noted !

---

<div class="post-metadata">

**Author:** ![SimonT](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@SimonT](https://forums.sketchup.com/u/SimonT)\
**Post date:** [September 19, 2024, 3:32pm UTC](https://forums.sketchup.com/t/dynamic-component-from-a-ruby-script/289904/5 "2024-09-19T15:32:03Z")

</div>

If you’d like any help putting together a DC feel free to reach out to me via [SimonT (@sketchupalive) • Instagram photos and videos](http://www.instagram.com/sketchupalive)
