Title / Description
Code # # _PDF_Viewer.rb # seems to only work with adobe pdf format, but that's what safari saves pdfs to, so if it won't open, re-save from safari # seems to open most image files at full size so you may want smaller copies, export to mail and post to self is cheap and easy, # batch conversion, or graphics convertor. # helpmenue.rb Created by Dan Rathbun on 14/02/2010. # 2010 @SCF. No? rights reserved. # modified for modal Mac usage by john@drivenupthewall.co.uk # show_modal works differently on PC's # user selected pdf + image veiwer # for PLAT=Mac & OS=OSX module SU_User module Menus require "sketchup.rb" # Check to see if the plugin is already loaded if not file_loaded? "_PDF_Viewer.rb" # where to look for it helpmenu=UI.menu('Help') helpmenu.add_separator # it's name in the Help menu helpmenu.add_item('PDF_Viewer') { #contents of dialog pdf = UI.openpanel; get_dialog = UI::WebDialog.new; get_dialog.show_modal; get_dialog.set_url(pdf) } end end file_loaded "_PDF_Viewer" end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code