Ok, I think I was missing an "end" on the last if statement. Fixed that and now get no syntax errors but the option does not appear on the Plugins menu when I restart SU...
Posts
-
RE: Ruby Script question re soften certain lines only
-
RE: Ruby Script question re soften certain lines only
Tried to finish it off but getting syntax error on the last line. Never created one before. Any ideas please? File is called softenv.rb and is in the plugins folder:
Soften all vertical lines in a model
require 'sketchup.rb'
def soften_vert
model = Sketchup.active_model
model.entities.each { |e|
if e.is_a?(Sketchup::Edge) && e.line[1].parallel?(Z_AXIS)
e.soft = true
e.smooth = true
end
}
model.definitions.each { |d|
if e.is_a?(Sketchup::Edge) && e.line[1].parallel?(Z_AXIS)
e.soft = true
e.smooth = true
end
}if( not file_loaded?("softenv.rb") )
add_separator_to_menu("Plugins")
UI.menu("Plugins").add_item("Soften vertical lines") { soften_vert }end
file_loaded("softenv.rb")
-
RE: Ruby Script question re soften certain lines only
Hey, thanks a lot for that quick response.
Actually what I should really have asked is how do I select all vertical lines. Then I can do whatever I want with them.
-
Ruby Script question re soften certain lines only
How hard would it be to write a Ruby Script that made all vertical lines in a model soft and smooth please?
-
Import KMZ/KML path data
Is there any way of importing a KMZ/KML file containing path data please? In other words containing "linestring" and "coordinates" tags. I want it to generate a series of connected lines in Sketchup that can then be displayed in GE in the correct location. Or does anyone know of a Ruby script that does it?
-
RE: Guide Lines disappear
I have a similar problem with 7.1. If I generate a guideline in one part of the model then move to another part of the model about 100m along the guideline I cannot zoom in to the guideline at all or it disappears. If I zoom in where I created the guide line I can zoom right in close. I have to double-click on the guideline with the tape measure tool at the far point so it creates a second guideline and I can then zoom in.