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

    Posts

    Recent Best Controversial
    • RE: Old robots

      @unknownuser said:

      http://farm1.static.flickr.com/187/468501593_451a82d225_m.jpg

      ...I'm a bit more of a retro fan when it come to robots. This one was done to practise texturing models.

      😄

      I love this guy - if you put him along side Ivica's robots, he seems to be saying "Can I play?" - he would make a great paper-model.

      posted in SketchUp Components
      J
      Jim
    • RE: [Plugin] zoom_selection.rb

      @tig said:

      Sorry for some bad news... Sketchup.send_action("viewZoomToSelection:") has zoomed the selection for some time !

      Also if you select something and right-click there is a context-menu for this called "Zoom Extents" (Should be called Zoom Selection but lazy bug fixers !)

      You can also shortcut key it to Z (I do already) by selecting something ans then opening the Preferences Window and Shortcut option, filter for 'Zoom Ex' and you'll get Edit/Item/Zoom Extents - set the Z key to that...

      Don't feel bad I have reinvented several inbuilt functions in my time !

      Thanks TIG, the difference is that if nothing is selected, my zoom selected does a zoom extents. In addition, I add a little extra zoom-out to fit my zooming tastes. A minor enhancement perhaps, but I miss it when it's not there.

      posted in Plugins
      J
      Jim
    • RE: [Plugin] zoom_selection.rb

      I've made a minor mod to this. After zooming in, I always find myself scrolling out just a little, so I added this "back-off" to the script.

      301 Moved Permanently

      favicon

      (www.sketchucation.com)

      posted in Plugins
      J
      Jim
    • RE: [Plugin] zoom_selection.rb

      @didier bur said:

      Hi Jim,
      I confirm this is for V6 only.
      A context menu would be handy too ! 😉

      Thanks Didier. There is a (mis-named) Zoom Extents context menu already in V6 - right-click > Zoom Extents. I could have used a simple key-shortcut to Edit/Item/Zoom Extents, but I think the single key shortcut to zoom to selection, or zoom to model extents makes for a better experience.

      posted in Plugins
      J
      Jim
    • [Plugin] zoom_selection.rb

      About

      zoom_selection.rb adds 2 items under the Camera menu; Zoom Selection and Zoom Out.

      • Zoom Selection zooms to the selected item(s). If nothing is selected it zooms to the model extents.
      • Zoom Out zooms out by a factor of 2.

      Suggested Usage

      I set up 2 key Shortcuts. I use the 'z' key mapped to Zoom Selection, and 'Shift-Z' to Zoom Out.

      Compatability

      I'm not sure if SU5 had the ruby methods available. I don't believe it did, in which case this is for SU6 or later. Can someone confirm?

      Installation

      Download and move zoom_selection.rb into your Plugins folder, restart SketchUp.

      zoom_selection.rb

      Script Authors
      Script writers can call the methods also:

      
      JF;;zoomSelection
      JF;;zoomOut(factor) # the larger the factror, the larger the zoom out
      
      
      posted in Plugins
      J
      Jim
    • RE: [Plugin] Ruby Toolbar

      Thanks Chris,

      The version I posted on SketchyUtils isn't up-to-date, I'll remove it. Download the version available in this thread.

      The position and size are saved in the registry, but only if the console is closed using the toolbar. Is it possible to save these settings if the console is closed using the X widget?

      posted in Plugins
      J
      Jim
    • RE: [Plugin] Ruby Toolbar

      @didier bur said:

      Hi Jim,

      @unknownuser said:

      would you mind sharing the minor tweaks

      I'm afraid it would be useless because I simply replaced all the calls to "Ruby Console" by "Console Ruby", but that's only for french. Each version of SU does have a particular name for the Ruby Console, so... Even a call to langhandler.rb (with 'getstring') will not work since this deals with a window name, not a message string or such. 😞

      Regards,

      Didier, GetString would work, but since it's only one string, I won't use LangHandler. I've updated the plugin to support FR.

      posted in Plugins
      J
      Jim
    • RE: [Plugin] Ruby Toolbar

      @didier bur said:

      Everything's OK with the french version now, including toggle
      Only minor tweaks were necessary 😆

      Great! But would you mind sharing the minor tweaks so maybe I can make the toolbar more international?

      posted in Plugins
      J
      Jim
    • RE: [Plugin] Ruby Toolbar

      @didier bur said:

      Jim,
      I'm having the "blank icons syndrom" (all png's are in Plugins folder)
      The line that seems to cause the problem is:

      imgdir = File.join(File.dirname(FILE), File.basename(FILE, ".rb"))

      It returns: ./(eval)
      then the icon file location File.join(imgdir, "rubypanel.png") returns: ./(eval)/rubypanel.png

      Please help !

      Didier, I'm, not sure why it works on my computer but not yours. I have updated the script to use a method that will hopefully be more robust. There should be a rubytoolbar folder in which the images are located.

      @didier bur said:

      The 'toggle' method doesn't work also. 😠 At least in V5.
      Question: Is findWindow.call(0,"Ruby Console") rely on language settings of SU ? I mean is "Ruby Console" available just for english versions of SU ? In this case the win32api call will not work with other platforms.

      This could very well be the case. If you have Ruby installed, you could try your local verion of Win32API.so located in C:\ruby\lib\ruby\1.8\i386-mswin32\Win32API.so.

      What is the title text of your Ruby Console window? Is it English "Ruby Console", or maybe French? I think findWindow is using the name of the window.

      @didier bur said:

      P.S.:

      UI.openURL("c;\\program files\\google\\google sketchup 6\\plugins")
      

      A non hard-coded command would be handy. Why not get this path from the registry ? Or something like:

      su_ver = Sketchup.version.split(".")[0].to_i
      if su_ver < 6
      devdir = File.dirname(Sketchup.find_support_file("sketchup.exe")) + "\Plugins"
      else
      devdir = ...
      end
      This makes the command compatible for SU5 and 6 (I guess), no matter where the user has installed SU.

      I use the find_support_file method; good idea.

      Thank you for the report, and your patience. Please download and try the updates.

      posted in Plugins
      J
      Jim
    • RE: [Plugin] Ruby Toolbar

      Oops, that was a major omission. I've added the attachment to the original post.

      posted in Plugins
      J
      Jim
    • [Plugin] Ruby Toolbar

      Ruby Toolbar

      About

      Ruby Toolbar provides some controls over SketchUp's Ruby Panel (or Console.) It is most useful to people who are writing Ruby plugins.

      This is a Windows-only plugin.

      The 5 toolbar buttons are shown below.

      https://sites.google.com/site/jimfoltz/sketchup/my-sketchup-plugins/ruby-toolbar/0936.png?attredirects=0

      They are:

      [ Show/Hide Ruby Console | Clear Console | Load a .rb | Reload last .rb | Browse Plugins Folder ]

      If someone wanted to contribute some good, meaningful icons I'd be grateful.

      The position and size of the console is saved to the Windows Registry when the console is hidden using the toolbar, and restored between sessions.

      Requirements

      • Sketchup
      • Windows
      • Win32API.so (if not already installed.)

      Installation

      Download the .zip file, extact the files, and move them into your Plugins directory.

      Didier, this is actually an update of the RubyPanelToolbar you have archived on your site.

      Download and info here

      posted in Plugins
      J
      Jim
    • Handling Unknown Arguments

      When testing code for Observers, I was curious about what exactly was being passed to the Observer event methods. I would normally trust the documentation, but in this case... So anyway, here's a little trick. If you prefix an asterisk (*) to the variable name in the method def, every argument passed to the method gets put in the variable as an array element.

      The ToolObsever methods below normally accept 3 parameters, according to the API docs;

      • A Tools object
      • The tool name
      • The toolid.

      In the code below, the args variable is prefixed with an asterisk, which make it into an array and each argument passed to the method are added to the array. This makes an easy way to inspect all of the arguments.

      
      class MyToolsObserver < Sketchup;;ToolsObserver
         def onActiveToolChanged(*args)
            print "onActiveToolChanged; "
            p args
         end
         def onToolStateChanged(*args)
            print "onToolStateChanged; "
            p args
         end
      end
      Sketchup.active_model.tools.add_observer(MyToolsObserver.new)
      
      

      And a look at some output:

      
      onToolStateChanged; [#<Sketchup;;Tools;0xc681940>, "CircleTool", 21096, 0]
      onToolStateChanged; [#<Sketchup;;Tools;0xc681940>, "CircleTool", 21096, 0]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "CircleTool", 21096]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "CircleTool", 21096]
      onToolStateChanged; [#<Sketchup;;Tools;0xc681940>, "RectangleTool", 21094, 0]
      onToolStateChanged; [#<Sketchup;;Tools;0xc681940>, "RectangleTool", 21094, 0]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "RectangleTool", 21094]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "RectangleTool", 21094]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "CameraOrbitTool", 10508]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "CameraOrbitTool", 10508]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "RectangleTool", 21094]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "RectangleTool", 21094]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "SelectionTool", 21022]
      onActiveToolChanged; [#<Sketchup;;Tools;0xc681940>, "SelectionTool", 21022]
      
      

      So the output is mostly right according to the docs. In some cases, there is a fourth argument passed to the methods. I can only guess what it is - perhaps a flag, or indicator of the tool state.

      posted in SketchUp Tutorials sketchup
      J
      Jim
    • Select Visible?

      Is there a plugin to select only geometry that can be seen on the screen?

      Edit: Including the backfaces. Maybe select visible is a bad description. How about select all within the field of view?

      posted in Developers' Forum
      J
      Jim
    • Armstrong 12&quot; square vinyl floor tile

      I've made a materials library of Armstrong vinyl floor tiles . All are 12"x12".

      I think I have all of them, minus the MODe collection. Get them before Armstrong sues me for ripping them from their site. 😉 Click on the Sketchy blog link in my signature.

      posted in SketchUp Components sketchup
      J
      Jim
    • RE: Upload / update der Modelle in 3Dwarehouse

      @rasch said:

      Das hat ja wunderbar funktioniert.

      Dank der schnellen und guten Hilfe hier im Forum ist es selbst mir gelungen dieses Problem zu lösen.
      Und da das Google Übersetzungstool eine gute Hilfe bietet ist dann auch mal eine Antwort auf englisch sehr hilfreich.

      Danke "Gaieus" und danke "Jim"

      Gruß
      rasch

      You are welcome 😄 See Edit Model ID.

      posted in Deutsch
      J
      Jim
    • Vector Magic Online Bitmap To Vector Converter

      This might be a useful tool for someone.

      http://vectormagic.stanford.edu/

      posted in Hardware
      J
      Jim
    • 1
    • 2
    • 207
    • 208
    • 209
    • 210
    • 211
    • 211 / 211