sketchucation logo sketchucation
    • Login
    1. Home
    2. simonstaton
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 16
    • Posts 81
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: If Toolbar is true make it false

      @dan rathbun said:

      @simonstaton said:

      that dosnt seem to work :s

      Close Sketchup, restart, open the 'GettingStarted' toolbar from the View > Toolbars menu. Then open the Ruby Console and try it again (paste it into the command box just as I had posted.)

      Then tell us the result. (You may have corrupted something.)

      no still nothing πŸ˜• how about my above method?

      posted in Developers' Forum
      S
      simonstaton
    • RE: If Toolbar is true make it false

      that should be fine as its only going to be run on pcs, damn macs πŸ’š

      as the 'status = UI.set_toolbar_visible("GettingStarted", false)' dosnt work and the send action can open and close the toolbar, is there no way to pickup if GettingStarted is showing and if it is have it send action to toggle it off?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • RE: If Toolbar is true make it false

      that dosnt seem to work :s

      posted in Developers' Forum
      S
      simonstaton
    • RE: If Toolbar is true make it false

      status = UI.set_toolbar_visible("GettingStarted", true) didnt seem to work :s

      is there anyway to detect so maybe code like: "GettingStarted" = true { Sketchup.send_action(21992)}

      Apologies for my coding attempts I am used to javascript and not ruby πŸ˜„

      posted in Developers' Forum
      S
      simonstaton
    • RE: If Toolbar is true make it false

      I just found the following in the Google SketchUp Ruby API

      status = UI.set_toolbar_visible("Camera", true)

      could I maybe change this to make what I want work?

      posted in Developers' Forum
      S
      simonstaton
    • If Toolbar is true make it false

      Hi,

      I have managed to capture the event to hide and open the Getting Started toolbar:

      Sketchup.send_action(21992)

      Now I have this is there anyway to make it so that if the toolbar is open make it closed and if its closed leave it closed meaning that each time I start up sketchup or when its started for the first time it will hide the Getting Started.

      maybe somthing like this (obviously not this but the basics 😲)

      21992 = true {Sketchup.send_action(21992)}

      Thanks Guys,
      Simon

      posted in Developers' Forum
      S
      simonstaton
    • RE: Snapto in Sketchup 6

      Great thanks dude, however is there anyway to edit the component options on a premade component as all my models are already in component form and have attributes asigned to them?

      posted in Developers' Forum
      S
      simonstaton
    • RE: Snapto in Sketchup 6

      I see this works perfect, however does it work in sketchup 6?

      posted in Developers' Forum
      S
      simonstaton
    • RE: Snapto in Sketchup 6

      any ideas?

      posted in Developers' Forum
      S
      simonstaton
    • RE: Snapto in Sketchup 6

      fix points would be best so for example the cube would only snapto the 4 sidewards facing sides.

      the idea is so that people who arnt so good with sketchup can easily drag components in from the component window and have them snap into the correct place without fiddling around.

      posted in Developers' Forum
      S
      simonstaton
    • RE: Run batch file from ruby as admistrator

      yes I know, but that easiest solution slipped through my hands 😲

      posted in Developers' Forum
      S
      simonstaton
    • RE: Run batch file from ruby as admistrator

      dont worry solved I just need to right click sketchup and run as administrator

      posted in Developers' Forum
      S
      simonstaton
    • RE: Run batch file from ruby as admistrator

      hmm so there is no way of doing this? I have updated my script with the following:

      tmp_cmd="My_tmp_file_"+Time.now.to_i.to_s+".cmd"
      cmd_path="C;/Temp/"+tmp_cmd
      cmd_line="\""+Sketchup.find_support_file('')+"/client/googleearth.exe\" /regserver\nexit"
      cmd=File.new(cmd_path, "w")
      cmd.puts(cmd_line)
      cmd.close
      UI.openURL(cmd_path)
      sleep(1)
      File.delete(cmd_path)
      

      if I cant run as admin is there any other way or registering google earths location outside of its default through command line or ruby?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • Run batch file from ruby as admistrator

      Hi,

      I am running a batch file from ruby using:
      ge=UI.openURL(Sketchup.find_support_file('')+"/registergoogleearthcmd.cmd")

      inside the batch file is the following:
      "C:\Users\Simon\Documents\Action Design Your Own v2\Action 3D\client\googleearth.exe" /regserver

      however when I run sketchup and the batch file is loaded it says it needs to be run as administrator now this command works fine if I load up cmd as admin and manually typing it in it goes straight through.

      So my question is how can I run this from ruby as an administrator?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • Snapto in Sketchup 6

      Hi,

      Does anyone know of a plugin that I could use or some ruby script that would allow me to drag in a component from the component panel and have it snap too another component face to face. So lets say we have two boxes with face a and face b, when I drag in the second box from the component panel is there a way that automatically face b would snap onto face a once it gets within distance of it?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • RE: Change Toolbar Icon Size

      surely those sizes are kept inside of the programs scripts meaning you would technicly be able to change them somewhere?

      posted in Developers' Forum
      S
      simonstaton
    • RE: Change Toolbar Icon Size

      the only issue is I am looking to distrubute the toolbar is there no way at all of making the icons bigger?

      posted in Developers' Forum
      S
      simonstaton
    • Change Toolbar Icon Size

      Hi,

      I have built my own custom toolbar with icons in ,png format however is there anyway to change the size of the icons? I have the toolbar set on large icons however this is still to small, where abouts would I edit the icon width and height?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • Executing a ruby file

      Hi,

      I was just wondering how I would execute an external .rb file on an event. I have a file called box.rb which is one of googles examples however how do I run this when a button is pressed?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • RE: Google earth import view ruby action

      Thanks Tig,

      I was just playing around with the ruby files for the help menu at the top and was wondering if the other menus such as tools are in a ruby file aswell?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • 1 / 1