Changing Style Parameters?


#1

I see the Sketchup.break_edges= method but I don’t want to use it.
First, I see that adding edges from script DOES NOT trigger line breaks anyway.(?)
After my script adds edges, I don’t want to prevent user from breaking edges, but I want her to be aware if any breaks occur. So I’d like to turn on the “endpoints” setting in the current style for edges.

I see that I can:
mod = Sketchup.active_model
ro = Sketchup.active_model.rendering_options
puts "Line ends " + ro[“DrawLineEnds”].to_s
ro[“DrawLineEnds”] = true

But how can I change the numeric value, say to 7 or 8 to ensure that users sees any line breaks?


#2

There are two rendering options that affect this part of style. “DrawLineEnds” is a boolean that turns the option on and off, and “LineEndWidth” is an integer that says how large to draw the ends. You may also be interested in “ExtendLines”, the boolean for turning on line extensions, and “LineExtension”, the integer value by which to extend.


#3

Thanks, that works
The terminology of the API is very different from the SketchUp UI:
LineEnds = Endpoints!