require 'sketchup.rb'
module DBUR
	def self.set_north_angle()
	#if Sketchup.app_name != "Google SketchUp"
	  #UI.messagebox("Sorry, this command only works with\nGoogle Sketchup FREE version !")
	  #return nil
	#end
	si = Sketchup.active_model.shadow_info
	dn=si["DisplayNorth"]
	si["DisplayNorth"]=true if dn == false
	na= si["NorthAngle"]
	prompt = ["North angle (clockwise to green axis): "]
	v=[na.to_s]
	result = inputbox prompt, v, "North Angle"
	return nil if not result
	si["NorthAngle"]=result[0].to_f
	si["DisplayNorth"]=dn
	end
	if( not file_loaded?("gs6_north.rb") )
		UI.menu("View").add_item("Set North") { self.set_north_angle }
	end
	file_loaded("gs6_north.rb")
	###
end
