Layout Ruby API Document.save

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

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.

# 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, then try assigning to it’s substyle.

1 Like