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: Google earth import view ruby action

      oh crap, so no way of moving it out of the menu and onto my toolbar?

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

      Hi,

      does anyone know what the action in ruby is for Tools>Google Earth>Get Current View?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      dont worry i needed to put a "+" between to two solved! thanks tig

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      ah there we go solved, now how would I merge the two? this dosnt seem to be working:

      ge=UI.openURL(Sketchup.find_support_file('')"/client/googleearth.exe")

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      ok that works with the full path however, google earth is not installed on the clients machine it will be inside sketchup in a way so when they install sketchup it will be inside the sketchup folder and where the sketchup folder is depends on where they have installed it on there machine. our clients are not pc friendly at all so keeping it to the basics is probably best

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      ok using the full path didnt work

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      @thomthom said:

      @simonstaton said:

      Tig I tryed your way however the location of the file needing to be run wont always be in the same place however it will be in the same folder of the program everytime so I cannot use the full path will this still working using "../../program.exe"?

      But you should try with the full path to ensure that the method work. Because if it does, then you know it is your relative path is incorrect. It might be that the working directory is not the one you assume it is.

      You could try File.expand_path() on your relative path and see what absolute path it translates to.

      ohh I see now ok I will give that a go.

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      Hi Tig,

      sorry im a bit of a newb when it comes to this stuff πŸ˜„

      I will try and explain from the sketchup folder where you have components etc the file I want to launch is "client/googleearth.exe" however the plugin that is calling it is client "Plugins/Utilities/Toolbar.rb" from the sketchup folder. So what command would I use to call the googleearth.exe from toolbar.rb

      posted in Developers' Forum
      S
      simonstaton
    • RE: Making an alert

      perefect thanks

      posted in Developers' Forum
      S
      simonstaton
    • RE: Launch an Application in RUBY

      Thanks for the reply guys,

      it silently fails using my way.

      Tig I tryed your way however the location of the file needing to be run wont always be in the same place however it will be in the same folder of the program everytime so I cannot use the full path will this still working using "../../program.exe"?

      posted in Developers' Forum
      S
      simonstaton
    • Making an alert

      Hi,

      is there anyway in sketchup to have an alert message displayed? so I want it that when an event happens an alert box appears warning the user. any ideas on how to do this?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • Launch an Application in RUBY

      Hi,

      I was just wondering how I could launch an application from my sketchuo toolbar. I have added the toolbar on however what event would I do to launch an application at the moment I am trying:

       cmd = UI::Command.new("Garden View"){
       shell.ShellExecute('../../client/gardenview.exe', '', '', 'open', 3)
       }
       cmd.small_icon = "finished.png"
       cmd.large_icon = "finished.png"
       cmd.tooltip = "Open Garden View"
       cmd.status_bar_text = "Testing the toolbars class"
       cmd.menu_text = "Test"
       toolbar = toolbar.add_item cmd
       toolbar.show
      

      however this isnt working to load ../../client/gardenview.exe any ideas?

      Simon

      posted in Developers' Forum
      S
      simonstaton
    • RE: Exploding selected model using ruby numeric values

      Hi Tig,

      I have sent you a pm with more details about the attributes exporter.

      posted in Developers' Forum
      S
      simonstaton
    • RE: Exploding selected model using ruby numeric values

      any ideas?

      posted in Developers' Forum
      S
      simonstaton
    • RE: Exploding selected model using ruby numeric values

      I know apologies,

      your second method worked perfectly however if you click the toolbar explode button more than once then it explodes again πŸ˜„ so I think your first method might be the best however woosh thats gone straight over my head lol.

      ill explain a bit more about what I am doing. I have used an attributes plugin in sketchup where I can right click on a component and assign it a price and name however as soon as I save the sketchup file the attributes are lost unless you put this component inside another component. so all of the components are inside another component and unless you explode the first component, when you go to plugins>attributes exporter nothing is shown.

      posted in Developers' Forum
      S
      simonstaton
    • RE: Exploding selected model using ruby numeric values

      ok that works perfect however this is where it gets a little complicated.

      For some reason when I used to use a numeric value it only exploded once, the way my components work is each model has a component inside a component and its the one inside that we need to keep as this has attributes we need to read.

      is there anyway we can only have it exploded the outside component and not the inside component?

      posted in Developers' Forum
      S
      simonstaton
    • RE: Exploding selected model using ruby numeric values

      Hmm it didnt seem to work but I dont think I have placed it correctly, any chance you could check this over for me:

       cmd = UI::Command.new("Explode") { 
       insts=[]; model.definitions{|d|insts << d.instances}; insts.flatten!
       insts.each{|inst|inst.explode}
       }
      
      posted in Developers' Forum
      S
      simonstaton
    • Exploding selected model using ruby numeric values

      Hi,

      I just wanted to check if there is a numeric values for exploding the selected model. I checked on the sketchup ruby api "http://code.google.com/apis/sketchup/docs/ourdoc/sketchup.html" however could not find one but I have done it in the past but now the numeric values have changed and it is not working.

      here is the explode function so far I have it selecting all the models next I need it to explode the select:

       cmd = UI::Command.new("Explode") { 
       Sketchup.send_action(21101)
       Sketchup.send_action(EXPLODE NUMERIC VALUE HERE)
       }
       cmd.small_icon = "finished.png"
       cmd.large_icon = "finished.png"
      
      posted in Developers' Forum
      S
      simonstaton
    • RE: Hide components panel on close

      @chris fullmer said:

      you have to instantiate the class as a tool.

      well I need it to hide when sketchup closes not on a tool press. you got any ideas on how I cans et this up to close on sketcup close. I have managed to get it to apepar on sketchup open. but its just closeing it

      posted in Developers' Forum
      S
      simonstaton
    • RE: ASP web interface

      I would suggest having a look at somthing called hypercosm

      posted in Developers' Forum
      S
      simonstaton
    • 1
    • 2
    • 3
    • 4
    • 5
    • 3 / 5