# Layout Ruby API Document.save

**URL:** <https://forums.sketchup.com/t/layout-ruby-api-document-save/332780>\
**Category:** Ruby API\
**Created:** [June 27, 2025, 7:23am UTC](https://forums.sketchup.com/t/layout-ruby-api-document-save/332780 "2025-06-27T07:23:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [June 27, 2025, 2:59pm UTC](https://forums.sketchup.com/t/layout-ruby-api-document-save/332780/5 "2025-06-27T14:59:15Z")

</div>

**a.** Please read up on how to post Ruby code in the forum:

- [[How to] Post correctly formatted and colorized code on the forum?](https://forums.sketchup.com/t/how-to-post-correctly-formatted-and-colorized-code-on-the-forum/46189/1)

**b.** Your hardware info in your forum profile looks to be out of date.

**c.** LayOut documents are weird in that many stylish features must be accessed via substyle.

```ruby
# Where label is a reference to your label object:
style = label.style
substyle = style.get_sub_style(Layout::Style::LABEL_LEADER_LINE)
substyle.stroked = false
substyle.start_arrow_type = Layout::Style::ARROW_NONE
# Set the style to apply changes
style.set_sub_style(Layout::Style::LABEL_LEADER_LINE, substyle)
label.style = style

```

So, basically if it does not work assigning to the [`entity.style`](https://ruby.sketchup.com/Layout/Style.html), then try assigning to it’s [`substyle`](https://ruby.sketchup.com/Layout/Style.html#get_sub_style-instance_method).

---

_[View the full topic](https://forums.sketchup.com/t/layout-ruby-api-document-save/332780)._
