🏢 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • How to snap?

    8
    0 Votes
    8 Posts
    489 Views
    Chris FullmerC
    This is an entire working script, from start to finish. Save it as a .rb file and its ready to go. It installs itself as "Plugins>Mouse Tools". There are no comments in the code whatsoever. I took them all out because the ones that were there were not terribly helpful, mostly just made it hard to read the code straight through. I believe that this code is more complex than absolutely necessary because it adds a few checks to make sure it does not call the draw method unnecessarily. Hopefully this helps. I'm still confused what portions of this code are doing.... require 'sketchup.rb' class Clf_mousetools def activate @ip = Sketchup;;InputPoint.new @iptemp = Sketchup;;InputPoint.new @displayed = false end def onMouseMove(flags, x, y, view) pos = @ip.position Sketchup;;set_status_text("#{pos.x}, #{pos.y}, #{pos.z}") @iptemp.pick view, x, y if( @iptemp.valid? ) changed = @iptemp != @ip @ip.copy! @iptemp pos = @ip.position; if( changed and (@ip.display? or @displayed) ) view.invalidate end end end def draw(view) if( @ip.valid? && @ip.display? ) @ip.draw view @displayed = true else @displayed = false end end end if !file_loaded?(__FILE__) then UI.menu("Plugins").add_item("Mouse Tools") { Sketchup.active_model.select_tool Clf_mousetools.new } end file_loaded(__FILE__) Chris
  • De-select edges Plugin?

    5
    0 Votes
    5 Posts
    378 Views
    thomthomT
    @chris fullmer said: @j_forrester said: Wow! Just had a look at this script. The most useful script for workflow I have seen. Great work! Thats because Thomas is amazing! Very kind words Chris. Thanks.
  • Component names

    5
    0 Votes
    5 Posts
    356 Views
    W
    Dear Amo, You can use Outliner to view long group/component names by stretching the box. If you have Outliner and Entity Info both open at the same time then you can easily select and rename groups and components. Regards, Bob
  • Face orthogonal to line?

    3
    0 Votes
    3 Posts
    302 Views
    GaieusG
    Well, you can certainly do that, Miguel (and yes, I know things often sound to be much more complex when written down like this than doing them actually) but I'm pretty sure there is an easy way with ruby. Just think about TubeAlongPath for instance; it has already done it. In fact, if there's no separate script, you could even use this plugin to make a simple tube then erase everything BUT the face at the end and use that for a perpendicular/orthogonal alignment.
  • SCF Toolbars Series

    17
    0 Votes
    17 Posts
    2k Views
    Chris FullmerC
    That ides keeps popping up in my mind too. But then what about all the other authors who do not host through smustard? There are a lot of them. I think I like the idea of hosting them here, with all the plugins included in the zip file (with all appropriate permissions, etc) with links to the "official" home to each plugin included in the thread. So there could be a link to each smustard script included, to each of Didier's scripts, to TBD's, to Jim's blog, to the thread on this forum where the script is maintained, etc, and a link to Cadfather's page if he'd like (and I think he deserves the publicity for taking the time to do it, and do it well). That way perhaps its easier to track each script and make sure the toolbar is using current versions of each script too. And it can be the SCF toolbar, as a collaboration with the SCF (as its hosted here), Cadfather (since he maintains it and hosts a version on his website) and all authors who frequent here. Is that overkill? And I think that satisfies everything in my mind - a single place to download and install a single package, with quick links to all separate scripts. Chris
  • Free RIDE to SU via ruby?

    6
    0 Votes
    6 Posts
    538 Views
    J
    Hello wadhahmm, You may have more understanding at one of the non-English languages forums. Although I have never tried FreeRIDE, it seems like too much for typical SketchUp/Ruby requirements.
  • Plugin Help

    4
    0 Votes
    4 Posts
    238 Views
    S
    http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=13672
  • JoinstSU tutorial ?

    9
    0 Votes
    9 Posts
    874 Views
    MALAISEM
    Hi Marcio What I've send, was a down and dirty test. I 'll study carefully your last advices. I'll probably make some tut in french soon... Regards Pierre MALAISE
  • Ruby script matte for photoshop

    14
    0 Votes
    14 Posts
    2k Views
    X
    would it be possible for the script to temporarily make SU ground and sky white/black as well?
  • What is ruby and how does it work in sketchup 7 ?

    6
    0 Votes
    6 Posts
    477 Views
    O
    It took a bit to understand what the rubys were. Now, I have a much better understanding. Thanks, John
  • PhotoMatch by intersecting ray tracing

    15
    0 Votes
    15 Posts
    1k Views
    T
    Yes.
  • Debugging?

    6
    0 Votes
    6 Posts
    371 Views
    P
    See plugin SCrud: http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=16791
  • SCF TWEAKTOOLS 1.0

    29
    0 Votes
    29 Posts
    4k Views
    Chris FullmerC
    No more subforums, please. I think its best off to let them work it out on their own like they are doing now behind the scenes. The details of it all don't need to be public. Chris
  • Watermarks with Ruby?

    17
    0 Votes
    17 Posts
    871 Views
    C
    @unknownuser said: If you go to Help -> Ruby Help inside SketchUp, that should take you to the V7 ruby doc. You could perhaps figure out how to code up a google search to scan the online help doc for "watermark". I'm sure there's a way to do it. Believe me I have summoned arcane google magicks to find information about managing watermarks in sketchup ruby. But I have failed in my quest. Plus, as Chris Fulmer pointed out, there is no "Help->Ruby Help" menu in my sketchup (version 7.0.8657) Perhaps I could hijack this otherwise stale thread to ask for more general advice about what I would like to do: I am interested in getting access to the images used as backgrounds in the scene tabs that are created when using the "match photo" feature. Are these images even watermarks? I foolishly imagine that I will be able to create additional photo matching features if I can gain access to these images. One thing I would like to do is use Overlay watermarks in addition to Background watermarks for photo matching. Including automatically varying transparency/visibility during the photo matching work flow. Are there already existing "match photo on steroids" tools available?
  • Array of all toolbar names

    3
    0 Votes
    3 Posts
    607 Views
    A
    You could overwrite the add_toolbar and toolbar_names methods of Sketchup. But you have to make sure that your plugin is the first loaded. azuby
  • Showing new geometry as its made?

    11
    0 Votes
    11 Posts
    731 Views
    Chris FullmerC
    Todd, thanks for the details! Very enlightening. And to put your mind at ease, I have been using modules to encapsulate my scripts. So there should be no namespace conflicts. I was unaware that any method defined as "initialize" will be called automatically. That is cool, and very good to know. And that exaplins how the methods were being called. All in all very informative and thanks for taking the time to respond to each question - there werew quite a few! Chris
  • Using DCL file to show dialog in SU

    4
    0 Votes
    4 Posts
    641 Views
    M
    That's not free...
  • Last tool recall?

    6
    0 Votes
    6 Posts
    1k Views
    M
    Please take a look here!
  • Profile Builder plugin- Problem- Help?

    26
    0 Votes
    26 Posts
    2k Views
    thomthomT
    In regards to the preview in PB, what about using Flash to draw it? That's supported on all platforms. And if you make the whole dialog in flash, then you don't have to worry about how different browers render it.
  • Web Exporter advanced controls

    5
    0 Votes
    5 Posts
    354 Views
    F
    Alright... as I said it's dirty code made at 1:00 AM with the one and only (failed) intent to make it work... so I could show the model with my iPod Touch... http://ales.foxleader.net/-REPO-/3D1/AlesFoxJet5XLS_index.html Note that "Gauche" is the french for "Left" while "Droite" means "Right" Also, all the code is in that page between the head tags, and my modified code is at the end of the head. I added this in the body: <a href="javascript&#058;cs(10)">Gauche</a> <a href="javascript&#058;cs(20)">Droite </a> and this before the end of the <script> tags in the head, modified from the handleRotate(e) function: function cs(e) { // STEP is how many pixels equals an image swap var STEP = 10; var width = sketchUpObj.offsetWidth; var delta = e addToPos = Math.floor(delta/STEP); //handle wrap around var wrap = (currentPos + addToPos) % imageCount; var newPos = (wrap < 0) ? imageCount + wrap ; Math.abs(wrap); //hide everyone except the image we are over for (var i = 0; i < imageCount; i++) { hide(sketchUpImageArray[i]); } show(sketchUpImageArray[newPos]); // return false; } I repeat, that's dirty code. Really dirty. Lol. I also know that it's JS, so not really Ruby but I guessed it was still the best section to post this. Thanks for your help!

Advertisement