šŸ¢ PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Get instance parent of selected entity

    5
    0 Votes
    5 Posts
    222 Views
    B
    Thanks both again I tried a different tack originally with an add_group/explode combo but TIG the instances option worked perfectly. Chris as I am disallowing component edit sessions for the time being and I am coding for SU 6 upwards, I will bear in mind Model.edit_transform for the future. BillW
  • Global Layer Name Change

    13
    0 Votes
    13 Posts
    445 Views
    Bob JamesB
    Good to go. Thanks for taking the time to mess with this small stuff, I certainly appreciate it.
  • Access Run Ruby Gems and Other Ruby Code From SU Ruby

    2
    0 Votes
    2 Posts
    386 Views
    J
    Welcome Bill, The first thing to try is append the $LOAD_PATH from the installed Ruby environment to the SketchUp environment. If you run IRB in your installed Ruby, and enter $LOAD_PATH ($: for short), you might see something like this: ["c;/ruby/lib/ruby/site_ruby/1.8", "c;/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c;/ruby/lib/ruby/site_ruby", "c;/ruby/lib/ruby/1.8", "c;/ruby/lib/ruby/1.8/i386-mswin32", "."] But in SketchUp, the $LOAD_PATH might be something like this: ["C;/Program Files/Google/Google SketchUp 7/Plugins", "C;/Program Files/Google/Google SketchUp 7/Tools", "C;/Program Files/Google/Google SketchUp 7/Plugins/Podium", "C;/Program Files/Google/Google SketchUp 7/Plugins/Podium", "C;/Program Files/Google/Google SketchUp 7/Plugins/ruby"] So in your SketchUp script, append the $LOAD_PATH from the installed Ruby to the $LOAD_PATH in script. # Script.rb $LOAD_PATH.concat(["c;/ruby/lib/ruby/site_ruby/1.8", "c;/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt", "c;/ruby/lib/ruby/site_ruby", "c;/ruby/lib/ruby/1.8", "c;/ruby/lib/ruby/1.8/i386-mswin32", "."]) Then see if you can require the needed libraries. You might need to install version 1.8.0 of Ruby because that is what SketchUp uses... although I have been able to copy the msvcrt-ruby118.dll from my installed Ruby to my SketchUp directory without obvious problems. (Rename original first, of course.)
  • Changing Edge "endpoints" rendering option

    7
    0 Votes
    7 Posts
    341 Views
    Chris FullmerC
    I used the code they posted in the API in RenderingOptions "each" method here: http://code.google.com/apis/sketchup/docs/ourdoc/renderingoptions.html#each_key But the example puts each key into a messagebox, so I changed "UI.messagebox" to "puts" so it would send it to the Ruby Console. The code looks like this: model = Sketchup.active_model renderingoptions = model.rendering_options renderingoptions.each_key { | key | puts key } and I run it in Jim's Web Concolse, which is my favorite Ruby development tool. Then I just went through the returned keys one by one and compared then to the API. There were quite a few missing ones in the API, and some in the API that don't actually exist. Chris
  • Debug Ruby Scripts Using Netbeans

    2
    0 Votes
    2 Posts
    671 Views
    Chris FullmerC
    Pecan has made a SketchUp debugger, but I think it works with FreeRiDe (I think?). It sounds like a monumental task to me, but who knows. Maybe your up for the task! Chris EDIT: It uses wxSTEditor, and here's a link to his debugger plugin: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18130&p=147722
  • Web dialogues

    4
    0 Votes
    4 Posts
    196 Views
    thomthomT
    I remember there was a hack to make applications embed Mozilla engine instead of the IE engine. But I'm not sure if it still works. There was some possibility for incompatibility as well.
  • Delete all scenes?

    6
    0 Votes
    6 Posts
    2k Views
    Chris FullmerC
    Interesting, I'm not seeing that. Perhaps you have a ruby installed that is conflicting. You might need to test which ruby it is.
  • Adding plugins on a mac

    6
    0 Votes
    6 Posts
    244 Views
    EdsonE
    this is easy. the normal place for plugins on a mac is: HD/library/application support/google sketchup/sketchup/plugins. the plugins folder at the user level is used very rarely by some plugins that install themselves. ocasionally, we put some plugin there in case there is a conflict between it and some other plugin.
  • BOX SELECTION - ruby request

    30
    0 Votes
    30 Posts
    831 Views
    TIGT
    ... So, make a temporary group of the instance and get the local_bounds if that, then explode it back as it was...
  • New API Object Diagram

    11
    0 Votes
    11 Posts
    655 Views
    thomthomT
  • Refresh plugins without restart Sketchup is possible??

    13
    0 Votes
    13 Posts
    2k Views
    D
    @pecan said: @davidsuke said: It is a excellent tool!! Only one bad thing, no syntax highlighting, but it's great!! Thanks for the advice!! If you want syntax highlighting you can use the editor here. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18130#p146440 [plugin] SuRDebug That's good, and it have auto-indent too??
  • Drop Ruby

    5
    0 Votes
    5 Posts
    351 Views
    R
    @chris fullmer said: Here's a few suggestions: Make sure they are all actually over the top of the terrain. They will get stopped by hidden geometry and I think even layers that are turned off. Try selecting those that did not drop and keep running the script on them. There is a good chance that many of them will drop the 2nd or 3rd time. Maybe something there will help? Chris thanks for the help! i got most to drop guess i will just do the rest by hand it wont drop the Land FX trees, it makes them go up and down and everywhere in bt, weird, maybe the ruby was not designed to work with land fx
  • Dimension tool : how to use it as a counter ?

    2
    0 Votes
    2 Posts
    249 Views
    R
    It is impossible with dimension objects, but possible with other methods.
  • Ruby Sketchup keyword list syntax highlighting

    2
    0 Votes
    2 Posts
    327 Views
    Chris FullmerC
    I think they have been made for Notepad ++. Check out this page: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=10142 and go down to Editor suggestions to find links to a version made by Didier and Radhikari. However, I don't know if those will be helpful though. I was thinking there might be some way to use them, or at least extract or convert their information into something useable by your editor of choice. But maybe someone else has a better suggestion, Chris
  • Notepad++ equivalent for Mac?

    5
    0 Votes
    5 Posts
    3k Views
    T
    Another useful app in this category is "TextWrangler"http://www.barebones.com/products/TextWrangler/ But "xCode" is hard to beat as it is made for the job and comes with every new Mac. @unknownuser said: people listed: TextMate Smultron xCode - might be included on the Mac. Recommended by RickW Tasman
  • Transformation.axes problem

    8
    0 Votes
    8 Posts
    351 Views
    T
    Of course. In the meantime I also found the right solution. This Sketchup is very powerful when you found the correct sequence of commands script! Thanks again. I think for my project (some ambitious) I will still need your advice. I hope that you are always online these days as then. Bye
  • HELP WITH THIS CODE, please?

    5
    0 Votes
    5 Posts
    269 Views
    TIGT
    If you don't use @xxx in front of the variable name it will work - xxx. If you use @xxx the last values you entered are remembered. Don't mix @xxx and $xxx like this - I recommend you stay with @xxx. However, you must assign the @xxx values before the dialog first runs - like this [###=changes] choose=[ "Frente 1", "Frente 2" ] @choose="Frente 1" ### set initial [default] @choose enums=[choose.join("|")] ### you just could use emuns=["Frente 1|Frente 2"] prompts=["TIPO","Ancho","Alto","Espesor"] @a=600.mm if not @a ### set defaults for @a - any changes to @a will be remembered for that session of SUp... @b=709.mm if not @b ### @c=19.mm if not @c ### values=[@choose, @a, @b, @c]### results=inputbox(prompts,values,enums,"Parametros del frente") return nil if not results ### 'nil' @choose,@a,@b,@c=results ### $a >>> @a etc ########### Frente 1 pz=[] pz[0]=[0,0,0] pz[1]=[100.mm,0,0] pz[2]=[100.mm,-@c,0]### pz[3]=[0,-@c,0]### edges=entities.add_curve([0,560.mm,0],[@a,560.mm,0],[@a,560.mm,@b],[0,560.mm,@b],[0,560.mm,0])### a >>> @a etc facez=entities.add_face(pz) facez.followme(edges) ### etc etc
  • Current material in material browser

    7
    0 Votes
    7 Posts
    377 Views
    Chris FullmerC
    Sounds like a plan to me!
  • Opening a custom-made directory with the components browser

    8
    0 Votes
    8 Posts
    507 Views
    R
    TIG- I am on a PC though trying to do a similar thing for the mac. I'll try some observer fun but am sure to be splatted into oblivion Thanks for your thoughts. best, Justin
  • How to remove common edges???

    6
    0 Votes
    6 Posts
    324 Views
    honoluludesktopH
    Oops, came here from "new posts". Got to read those subject titles better. I took a couple of swings at ruby, then put the bat back on the rack before my hands blistered

Advertisement