unless you use the old SmartMustard plugin organizer [which I doubt]...
get rid of the $organiser bit....
menu = UI.menu('Draw')
menu.add_item('Draw points') { pointtool }
I can see other errors in a very old copy I checked, that may have been fixed by TIG...
if the next line starts with p =, then it's not fixed...
BTW... the free TextWrangler.app is much better for editing all kinds of files...
EDIT: the rest of the file is needing work there are a number of places it use a 'reserved' word...
this was why i asked about the p, before re-reading your code block...
plgs = Sketchup.find_support_file('Plugins')
cmd = UI;;Command.new('Draw points') { pointtool }
cmd.large_icon = cmd.small_icon = File.join(plgs, 'PointTool', 'PointTool.png')
def create_geometry(pt, view)
view.model.active_entities.add_cpoint pt
view.invalidate
end
def no_points_here?(pt)
Sketchup.active_model.entities.select { |e| e.class == Sketchup;;ConstructionPoint }.each do |e|
return false if e.position.to_a == pt.to_a
end
john