# Show dynamic component options from custom item ( shortcut )

**URL:** <https://forums.sketchup.com/t/show-dynamic-component-options-from-custom-item-shortcut/145954>\
**Category:** Ruby API\
**Tags:** sketchup\
**Created:** [December 13, 2020, 1:33pm UTC](https://forums.sketchup.com/t/show-dynamic-component-options-from-custom-item-shortcut/145954 "2020-12-13T13:33:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [December 13, 2020, 2:51pm UTC](https://forums.sketchup.com/t/show-dynamic-component-options-from-custom-item-shortcut/145954/2 "2020-12-13T14:51:51Z")

</div>

> [@rborgniet](#):
>
> I had the idea to be able to open/display the dynamic component option dialog box directly from an item in my toolbar, I would like to make a kind of shortcut in my toolbar.

The Dynamic Components extension already comes with a toolbar of it’s own that has the button you desire.

You can use [Aerilius’ Toolbar Editor](https://extensions.sketchup.com/extension/e413511f-0517-4115-8d81-90039a20a72c/toolbar-editor) extension to create custom toolbars, and to add this button to a custom toolbar.

* * *

All this aside, the DC extension is closed source and it is not always easy knowing what other extension’s `UI::Command` objects are. It is an advanced concept in Ruby that must use reflection to find such information (if it can be found. Ie, there are ways to hide such things.)

Anyway I have **already** posted here in the past on how to do this with code snippets.  
(Please learn how to search categories using the magnifying glass menu [upper right].)

_See:_ [Close Component Option & Component Attribute windows using ruby script - #6 by DanRathbun](https://forums.sketchup.com/t/close-component-option-component-attribute-windows-using-ruby-script/83784/6)

So, given the methods to actually do the opening or closing, you will need to use the [`UI::Toolbar`](https://ruby.sketchup.com/UI/Toolbar.html) class and [`UI::Command`](https://ruby.sketchup.com/UI/Command.html) class to create the toolbar and buttons. (The button images will need to be a absolute path into the DC extension’s folder.)

Please change the module names (in the sample code) to something unique for yourself for the toplevel namespace module.

---

_[View the full topic](https://forums.sketchup.com/t/show-dynamic-component-options-from-custom-item-shortcut/145954)._
