Why is 2013 breaking this plugin?
-
I wrote a very simple plugin for SketchUp 8 which no longer seems to work with 2013. Is there something different or new that I need to add into the ruby code? Below is my simple code which takes every line in an Autocad file and breaks out the end points. Nothing complicated.
require "sketchup.rb" module CD def self.export_points model = Sketchup.active_model ents = model.active_entities path = UI.openpanel() if not path then return end aFile = File.new(path, "w") ents.each{|e| if e.is_a?(Sketchup;;Edge) sp = e.start #starting point of the line ep = e.end #ending point of the line x1 = sp.position.x y1 = sp.position.y x2 = ep.position.x y2 = ep.position.y aFile.puts(x1.to_s().chop + " " + y1.to_s().chop) aFile.puts(x2.to_s().chop + " " + y2.to_s().chop) aFile.puts(" ") end } aFile.close() UI.messagebox('Script Complete') end # CD.export_points end # MODULE filename = File.basename(__FILE__) if not file_loaded?(filename) UI.menu("Plugins").add_item("ExportWalls") {CD.export_points} file_loaded(filename) end
-
What kind of errors do you get in the ruby console?
-
hi
it works on my mac...
you need to fill in your details, so we know what os etc... your using.
also use a code block to add your code to the message.
you may be having permission issues, but I don't even know which platform your using.
john
-
What is breaking? What is expected behaviour?
Advertisement