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

    Topics

    • W

      How to get the path to a Mac application?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      200 Views
      C
      hahhaha sorry http://rubyosa.rubyforge.org/tutorial.html
    • W

      Difference between win32api.rb and win32api.so?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      938 Views
      thomthomT
      what version did you download?
    • W

      How to read the windows registry?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      18
      0 Votes
      18 Posts
      14k Views
      Al HartA
      This ruby uses Win32API to read the registry, and works on Vista. But it may not work if you are not an Administrator (who knows). It is looking for the entry: HKEY_LOCAL_MACHINE\SOFTWARE\Render Plus Systems\IRender_nxt_location So you will have to change it to the registry key you are looking for. class Your_class def self;;get_reg_functions @@RegCloseKey = Win32API.new('advapi32', 'RegCloseKey', 'L', 'L') if @RegCloseKey == nil @@RegOpenKeyEx = Win32API.new('advapi32', 'RegOpenKeyEx', 'LPLLP', 'L') if @RegOpenKeyEx == nil @@RegQueryValueEx = Win32API.new('advapi32', 'RegQueryValueEx', 'LPLPPP', 'L') if @RegQueryValueEx == nil #@@RegCreateKeyEx = Win32API.new('advapi32'', 'RegCreateKeyEx', 'LPLLLLPPP' 'L') end#def def self;;get_registry_entry(key, sdefault = "") #trace("key; %s",key) get_reg_functions key.tr!('/','\\') sret = sdefault # strip of section spos = key.Find('\\') if (spos < 1) do_error("Cannot parse registry key %s - Key must contain a backslash\n",key) return(sdefault) end#if firstpiece = key.Left(spos) mainkey = key.Mid(spos+1) if (firstpiece == "HKEY_LOCAL_MACHINE") root = HKEY_LOCAL_MACHINE elsif (firstpiece == "HKEY_CURRENT_USER") root = HKEY_CURRENT_USER else printf("Registry key must start with HKEY; %s",key) return(sdefault) end#if # strip off final key spos = mainkey.ReverseFind('\\') if (spos < 1) printf("Cannot parse registry key %s - Key must contain a backslash\n",key) return(sdefault) end#if lastpiece = mainkey.Mid(spos+1) mainkey = mainkey.Left(spos) phkey = [0].pack('L') # a 4 byte string of 0's go get handle ret = @@RegOpenKeyEx.call(root, mainkey, 0, KEY_READ, phkey) printf("ret; %s mainkey; %s\n",ret,mainkey) if (ret != 0) printf("key not found; %s\n",key); return(sdefault) end#if hkey = phkey.unpack('L').first # convert stron pointer to integer # create a buffer for the result buf = 0.chr * 1024 size = [buf.length].pack('L') # store size of buffer ret = @@RegQueryValueEx.call(hkey, lastpiece, 0, 0, buf, size) if (ret != 0) printf("location not found; %s\n",key); return(sdefault) end#if # if ret == ERROR_MORE_DATA, then we should call again with a larger buffer @@RegCloseKey.call(hkey) sret = buf.nstrip # stop at 0 byte printf("sret; %s length; %d key; %s\n",sret,sret.length,key) return sret end#def # this returns the location without a slash def self;;find_application_folder(smodule) #skey = sprintf("HKEY_LOCAL_MACHINE\\SOFTWARE\\Render Plus Systems\\%s_location", smodule) skey = sprintf("HKEY_LOCAL_MACHINE/SOFTWARE/Render Plus Systems/%s_location", smodule) sloc = get_registry_entry(skey) printf("sloc; %s from skey; %s\n",sloc,skey) if (sloc && FileTest.exists?(sloc)) sloc.tr!('/','\\') #printf("RETURNING 1 sloc; %s\n",sloc) return(sloc) if sloc != nil end#if printf("Registry entry not found; %s\n", skey) return nil end#def end#class Your_class Your_class;;find_application_folder("IRender_nxt") read_registry.rb
    • W

      Subdivide and Smooth Tutorial Contest

      Watching Ignoring Scheduled Pinned Locked Moved Extensions & Applications Discussions extensions
      10
      0 Votes
      10 Posts
      6k Views
      takesh hT
      @whaat said: It won't be too hard to pick the winner. There was only one entry! Oh well... Oh so I got two round-trip plane tickets to Finland? That's a good news... @whaat said: Can anyone explain the lack of entries? Making tutorials for software is not everybody's favorite passtime I guess. I kinda enjoy doing it, hence the steady updating of "Visual Index of Ruby scripts". http://www.pushpullbar.com/forums/ruby-scripts/9467-visual-index-ruby-scripts.html I always wanted to write about this script in the Visual Index, but the complexity of the script and three-picture-per-script limit of the forum (half self-imposed) didn't allow me to take on the task. I also happened to have the idea for the tutorial and the material at hand, which I initially thought about a SU book-deal (now dead). So it was like a perfect opportunity for me... I hope my tutorial lived up to your standard, Dale. (BTW Camtasia Studio didn't live up to mine!)
    • W

      How to launch applications on Mac with Ruby?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      474 Views
      TIGT
      Works fine on my PC with Vista. Opens an app (.exe) or a file with it's assigned app... Puzzling...
    • W

      Notepad++ equivalent for Mac?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      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
    • W

      Subdivide and Smooth Feature Requests

      Watching Ignoring Scheduled Pinned Locked Moved Extensions & Applications Discussions extensions
      63
      0 Votes
      63 Posts
      13k Views
      JpacJ
      The demonstration was incredible. Sculpting tools! Go Dale Go!
    • W

      Whaat's Up Blog

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      411 Views
      MALAISEM
      Excellent ! MALAISE
    • W

      OBJ Import

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Feature Requests sketchup
      11
      0 Votes
      11 Posts
      2k Views
      thomthomT
      I can live with the extra size. Disk space is cheap. The other formats just doesn't seem to cut ut. 3ds for instance is to old it can only have meshed with less than 32K polygons and texture filenames are trunkated to the old 8.3 DOS type for naming to name a couple.
    • W

      How to get a pixel value from an image file?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      674 Views
      R
      Yet another bridge to a C++ library... (sigh)
    • W

      [Plugin] Zorro2 (beta)

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      314
      0 Votes
      314 Posts
      348k Views
      Rich O BrienR
      @GGERMANCRUZ said in [Plugin] Zorro2 (beta): @Whaat The plugin is wonderful, a shame it hasn't been updated in so long Zorro is now part of Artisan 2 tool suite
    • W

      Profile Builder released!

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      125
      0 Votes
      125 Posts
      59k Views
      MarianM
      @whaat said: Try opening Internet Explorer and go to Tools->Internet Options->advanced->reset...You could also try upgrading your version of Internet explorer if you haven't done so for awhile. You could also try deleting PB entirely and then re-installing. Tried all of those to no avail. @whaat said: ProfileBuilder uses a IE based web-dialog so it is possible that your IE settings are preventing it from running properly. It may still be possible that IE is the cause of the problem because I have also a problem with Yahoo Messenger which uses IE in some way too and I can't see any writing when I send or receive messages with it. I tried all sorts of things to get that one fixed and none worked so I think IE is in some way corrupted and I can't solve these problems without reinstalling Windows.
    • W

      [Plugin] BoolTools just released!

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      84
      0 Votes
      84 Posts
      68k Views
      W
      @nutsandboltz said: So this thread is probably dead, but it's worth a try, anyway. I cannot purchase BoolTools on Smustard. The plugin does not show up in the SMustard's product list, but the link that's been provided to it in multiple Sketchucation threads still works. Any idea how I could get a hold of it? My free trial will run out soon, and I'd rather have a boolean plugin if possible. I'm using Sketchup 2016. Thanks! Hi NutsandBoltz, I chose to temporarily take Booltools off the market as it was too unstable. I hope to relaunch an update in the near future but I can not guarantee when that will happen.
    • W

      Mac Webdialog opens in background

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      529 Views
      scottliningerS
      @thomthom said: Just had another though, if you really want a modal window on mac? Not possible? Not currently possible, unfortunately.
    • W

      Manipulating the InputPoint

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      2k Views
      thomthomT
      So I'm not mad!
    • W

      Is it possible...

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      811 Views
      TIGT
      @whaat said: Is it possible to enter 'component edit mode' with Ruby? Is it possible to prompt the user to browse for a file folder (not a file)? If not, consider these requests for the next service release of SU. Thanks. I used a trick to edit groups [PC only] - components could be done similarly... require 'sketchup' require 'win32ole.so' def edit_group ### an example of access SUp tools not otherwise available... ### make shortcut here if NOT set already = ctrl+alt+shift+G ### check that you have one group selected and if so do this... WIN32OLE.new("WScript.Shell").SendKeys("+^%{g}") end#def ### run it from within other tools ### the menu here for test only... if(not file_loaded?("edit_group.rb")) UI.menu("Plugins").add_item("Edit Group"){edit_group} end#if file_loaded("edit_group.rb") ### This is how I find a directory - you do need to pick a file in it though... require 'sketchup.rb' #----------------------------------------------------------------------------- def materialimporter model= Sketchup.active_model materials= model.materials model.start_operation ("Import Materials") ###undo - see commit at end pwd= Dir.getwd.split("/").join("\\")+"\\" ### fix for SU drctry= UI.openpanel "To Pick this Directory; Pick Any Image File + OK...", pwd , "*.???" return nil if not drctry drctry= File.dirname(drctry) return nil if not drctry cwd= Dir.chdir(drctry) images= Dir["*.{jpg,png,tif,bmp,gif,tga,epx}"]### for all supported image file types for image in images imgname= image.split(".")[0..-2].join(".") ### removes .jpg etc from end mat= materials.add(imgname) mat.texture= image end#for image### model.commit_operation ###undo all if needed end#def### .
    • W

      Coming Soon:Profile Builder

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      97
      0 Votes
      97 Posts
      14k Views
      P
      It's released. http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=15538&p=120193#p120193
    • W

      Group.make_unique (possible Ruby bug)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      340 Views
      TIGT
      A Group is a single Instance of a Definition - and of course there should only ever be one of them, but sometimes SUp with Ruby thinks that a copy of a Group is another Instances. The way round it in Ruby is to use make_unique on the copy of the group (instance) as you go. It will return an error but it should work anyway... It might get fixed one day...
    • W

      SkIndigo Advanced Tutorial

      Watching Ignoring Scheduled Pinned Locked Moved Extensions & Applications Discussions extensions
      3
      0 Votes
      3 Posts
      1k Views
      W
      I have received the tutorial from Redot. Thanks everyone.
    • W

      [Plugin] Smoothstep Animation

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      80
      0 Votes
      80 Posts
      92k Views
      fredo6F
      @Grice There is something weird in the style of the model that makes Sketchup freeze when views are changed by program. This is true for the native animation, whether Play or Export Video. This even happens when you change scenes manually. I notice the same behavior when building a fly-through animation based on your scenes with Animator. Sketchup seems to block and freeze at certain transitions, which makes the generation quite long (I cannot attach it here as it is too big, but I can post it on YouTube if you are OK). Anyway, the model is useful to me for Animator, as it shows that Animation should be edited with simple styles, using complex styles only for generation of videos. EDIT: I investigated deeper this problem of freeze: for some frames, and inexplicably, write_image can take more than 2 minutes this seems to be related to the watermark This has nothing to do with the face-me components Fredo
    • 1
    • 2
    • 3
    • 4
    • 5
    • 3 / 5