πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
  • Writing out temp files - How to cleanly delete when done?

    23
    0 Votes
    23 Posts
    4k Views
    AdamBA
    @chris fullmer said: Currently, on Vista 64 when I create the folder in sketchup ruby, if I try to delete the folder through the windows explorer it tells me the folder is currently being used in another app. And I get an error as well when I try to delete the open folder through another instance of SketchUp. I just don't know how it will react in other windows versions and on a Mac, especially since SU on OS is MDI. It might not be able to differentiate which instance of SU created the folder and which is trying to delete it. But it would be interesting to test. Chris, Not being able to delete a folder/file on Windows typically means there is a process somewhere with a 'handle' to the file/folder. Yes, it is pathetic that Windows still cannot handle stuff like this - every other OS can.. but anyway.. First double check you really are releasing the File Descriptor handle you use in Ruby. If you the file isn't really closed, you won't be able to delete it. Adam
  • Meaningless Menu Separators

    5
    0 Votes
    5 Posts
    244 Views
    Dan RathbunD
    @thomthom said: You mean so that separators only adds a separator between the native tools and the plugin tools? And.. I agree with the above for Main menus (incl. "Plugins",) and the right-click Context menu.
  • Beginners Guide??

    8
    0 Votes
    8 Posts
    866 Views
    Dan RathbunD
    Ruby Newbie's Guide to Getting Started
  • Sketchup 8 Patch ETA

    15
    0 Votes
    15 Posts
    2k Views
    Dan RathbunD
    And now I'm REALLY hoping for M2... the toolbar entries in my Registry are up to 566 and growing !! Sketchup is very slow to startup. (sigh.. manual delete of registry keys, again.. and again.)
  • Web Dialogs -Get string from Ruby before Body loads?

    35
    0 Votes
    35 Posts
    1k Views
    Chris FullmerC
    Thanks Dan. I'll look at that and point the html developer to it. In the end we've got it worked out now, but only after some serious extra effort.
  • OnTransactionStart/Commit oddities?

    29
    0 Votes
    29 Posts
    2k Views
    Dan RathbunD
    Yes the more I think about it, 2 Operation callbacks with an opflag parameter makes more sense, less documentation to maintain in the API pages... easier to program. Simplest all around.
  • Extending SketchUp entities

    16
    0 Votes
    16 Posts
    1k Views
    Dan RathbunD
    @thomthom said: @dan rathbun said: But what's the big deal? It's better than modifying the base API class, isn't it? If my script iterate the entities in a model and extends them with my mixin module - then I wouldn't want to affect other scripts. It'd be the same as modifying the base class. We'll yes.. if you end up defining a new singleton method for EVERY Sketchup::Entity subclass instance in the model(s), then it would be comparable to extending all the classes themselves. Also.. a singleton method, is in effect, a single instance override of any inherited method of the same name, so (referring to my previous example,) if Google later ended up adding a :has_dictionary? method to the API Sketchup::Entity superclass, my example would be overriding that method, on an individual instance basis.
  • System(iexplorer) freezes sketchup until iexplore is closed

    4
    0 Votes
    4 Posts
    335 Views
    Dan RathbunD
    Just stumbled upon this old post... and saw that the correct answer was never given. (Lest some newbie be misinformed, by finding this topic, I'll add the correct answer.) Don't use system(), use UI.openURL() UI.openURL("file;//C;/output.html")
  • Google Sketchup and MySQL

    2
    0 Votes
    2 Posts
    497 Views
    Dan RathbunD
    The forum search should have brought up this topic, that's only a few days old: How to Connect Ruby to MySQL
  • GUI Toolkit: Shoes

    4
    0 Votes
    4 Posts
    627 Views
    Dan RathbunD
    Never saw that before.. it's kinda weird the way it's setup, but alot like MacRuby also. He seems to have put a Ruby interpreter inside it, so I don't know yet.. may take a huge rewrite to have it work in a normal Ruby way. And then there's the issue of communicating with the Sketchup app... he's seems to have gone out of his way to be sure each "Shoes" app is separate.
  • WebDialogBuilder class : brainstorming

    13
    0 Votes
    13 Posts
    444 Views
    Dan RathbunD
    no problem.. These classes are kinda deprecated.. (unless you had to make up a custom control, perhaps an image button...) because nowadays most browsers render controls on a webpage using the native OS's control set. You can be sure this is done in MSIE (for older versions,) by including a <META> tag in the <HEAD> section, thus: %(#8000BF)[<META HTTP-EQUIV="MSThemeCompatible" CONTENT="Yes">] And you'll get XP style controls, instead of the old ugly gray Win 3.x style controls. The tag will be ignored on OSX, as Safari would use Apple style controls.
  • Back_material of a face

    5
    0 Votes
    5 Posts
    208 Views
    K
    working meanwhile... thanks for the help.
  • 2D fillets and CNC

    46
    0 Votes
    46 Posts
    16k Views
    B
    exactly what I need !
  • What is the url for the google account sign in dialog?

    7
    0 Votes
    7 Posts
    461 Views
    Dan RathbunD
    IF you must, you can instantiate a UI::WebDialog object, that uses: def login_to_3D_warehouse() title = "3D Warehouse Login" key = "3D_Warehouse_Login" settings = Hash[ ;dialog_title, title, ;scrollable, false, ;preferences_key, key, ;min_height, 500, ;min_width, 600, ;height, 500, ;width, 600, ;left, 400, ;top, 300, ;resizable, true, ;mac_only_use_nswindow, true ] dlg = UI;;WebDialog.new( settings ) lang = Sketchup.get_locale[0..1] dlg.set_url("https://www.google.com/accounts/ServiceLogin?service=warehouse&passive=1209600&continue=http://sketchup.google.com/3dwarehouse/?hl%3D#{lang}&followup=http://sketchup.google.com/3dwarehouse/?hl%3D#{lang}") return dlg end # login method # elsewhere in your code; login_to_3D_warehouse().show()
  • Where is favorite Collections info being stored?

    5
    0 Votes
    5 Posts
    163 Views
    Dan RathbunD
    Well.. hmmm. unless you are an expert at the format of the Mac plist, and the Windows Registry, it's best to tell the user how to add the collection manually. Otherwise see if there is already a library extension by some other plugin author that your plugin could call. Check the Code Snippet list.. and or the Plugin Index in the "Plugins" forum.
  • WebDialogs using Chrome : any interest ?

    25
    0 Votes
    25 Posts
    1k Views
    JD HillJ
    I'm very sure of that, and it was not my intention to imply otherwise. It just sounded like you were keeping that possibility open, so I felt the need to speak up. If it's your intention that it be strictly opt-in though, the idea sounds nothing but good to me.
  • Output debug info externally under OSX?

    2
    0 Votes
    2 Posts
    126 Views
    Dan RathbunD
    How does the Logger from the standard library work on Mac?
  • Convert a String to Float

    4
    0 Votes
    4 Posts
    254 Views
    G
    @thomthom said: hcal.to_f doesn't modify hcal, it returns a float. So you need to write it like so: hcal = hcal.to_f thanks to both you... yes, both codes work nicely; i spent 3 hours to look for a solution, and i get 2 different, in a few minutes, on sketchucation... learning ruby on the internet is an exciting experience
  • Help with WebDialogs

    5
    0 Votes
    5 Posts
    199 Views
    Dan RathbunD
    @joshb said: I'm obviously new to ruby and appreciate all the pointers. Pay attention to the "Sticky" threads at the top of the forum. (They have the "S" in them.) This will get you going: Ruby Newbie's Guide to Getting Started
  • Hiding an Entity

    3
    0 Votes
    3 Posts
    137 Views
    K
    Great! Thank you.

Advertisement