sketchucation logo sketchucation
    • Login
    1. Home
    2. MartinRinehart
    3. Topics
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 131
    • Posts 766
    • Groups 1

    Topics

    • M

      How Many Are in This Army?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      8
      0 Votes
      8 Posts
      460 Views
      Chris FullmerC
      That is not total hits, that was unique reigistered users. So being in the 100,00's of thousands is not possible, since we only have (nearly) 40,000. So 16,000 of those 40,000 have logged in this year. Plus that does not account for all the people who choose to hide their login status, and all the people with accounts but who do not take the time to log in. Chris
    • M

      Writing Readable Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      422 Views
      Dan RathbunD
      @unknownuser said: [Is it because ] super [is ] a keyword? Hence this exception? I believe so. If you look at the lex.c file in the Ruby source, you'll see there are only 3 keywords that use argument lists: defined?, super and yield. In the eval.c file, you see these statements are converted into internal C function calls, (like everything else in Ruby.)
    • M

      VisMap v3 Beta Testers Needed

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      3
      0 Votes
      3 Posts
      879 Views
      L
      so supriese!,i like to test it ! my Email: leixing333@gmail.com
    • M

      VisMap v3 Coming Soon

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      3
      0 Votes
      3 Posts
      960 Views
      D
      Hi Martin, is VisMap v3 out? Where can I find it please? Thanks! Cheers, . Diego .
    • M

      JavaScript to Empty Something

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      255 Views
      thomthomT
      The former used to be the W3C standard way. The latter used to be the non-standard. But as of HTML5 I believe innerHTML and outerHTML are now standard. Pretty well supported anyway.
    • M

      Default animation settings, a 2nd question

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      374 Views
      thomthomT
      @martinrinehart said: Microsoft (MSFT) deliberately made Windows programming as complex as possible, as was suspected by all who tried it (I'm one) and was later confirmed by internal documents ferreted out during the antitrust trial. It would be extraordinarily unlike Google to do any such thing. So you ask, "Why?" This is not something MS controls. It's what Google (or @Last) did when they implemented this. I do not know why they chose to group it though.
    • M

      [Plugin] Camera Stats

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      36
      0 Votes
      36 Posts
      40k Views
      S
      Hoping to revive this thread yet again. Does anyone know how to change the Focal Length rather than the Field of view? I can't figure out why that line is greyed out. I'd like to match to a Rhino camera and can only get Focal length from Rhino.
    • M

      Camera.set() and Camera.new() -

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      218 Views
      No one has replied
    • M

      Google's New API Doc

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      301 Views
      M
      Tracking: problem does not appear in Opera of Firefox. It's a Chrome bug. Googled "how to report a Chrome bug." Following thru, closed and reopened Chrome. Problem gone. Glad I took that screenshot showing the problem.
    • M

      Ruby Docs

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      16
      0 Votes
      16 Posts
      2k Views
      Dan RathbunD
      post moved @wsellers89 said: Is there a good reference or tutorials for learning more about Ruby on SketchUp? Free downloadable PDF version of "Automatic SketchUp" at Google Docs (Look for the download link in the upper-left of toolbar.) EDIT: As of JULY 2010 Google reports "Sorry, the page (or document) you have requested is not available." Try the author's website: Automatic Sketchup You ALSO need to learn some standard Ruby, the old 'Pick-Axe' book "The Pragmatic Programmer's Guide: Programming Ruby" http://phrogz.net/ProgrammingRuby/frameset.html (There is a tar download link at the bottom of the left pane.) @wsellers89 said: I am experienced in Fortran and to a less extent C, but I can follow most of the the code. The weirdest thing about Ruby (and it's kept secret from newbies, I guess to surprise them in the advanced course?,) is that Ruby has no actual variables like BASIC, Pascal, or FORTRAN. Read this post for more info: [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=26437#p230201:2y8qpfiu]By value or by reference?[/url:2y8qpfiu] I personally would ALWAYS tell experienced programmers about this FIRST thing, as it can and has led to much wasted time and frustration. @wsellers89 said: I am not sure what ".to_f" does in the loop to parse out the x,y points and would like to know more. Converts the object (on the left of the dot,) to a Float class. This is one of the standard Ruby instance methods. [url=http://phrogz.net/ProgrammingRuby/builtins.html#builtinclassesandmethods:2y8qpfiu]Built-In Class and Methods[/url:2y8qpfiu] This old 'Pick-Axe' version was written for Ruby 1.6.x, but still helps alot. Sketchup is using the 1.8.x branch, but the book is still say 95% valid. Ver 1.8.x renamed a few Exceptions, added some more methods, etc. (There are updated hardcopy books available for sale for the 1.8.x and 1.9.x branch. Check booksellers or Ebay.) Other Topics here at SketchUcation on Ruby Programming: [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=10142:2y8qpfiu]SketchUp-Ruby Resources[/url:2y8qpfiu] [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=20427:2y8qpfiu]Developer Forum Sticky Links[/url:2y8qpfiu] [url=http://forums.sketchucation.com/viewtopic.php?f=180&t=27606:2y8qpfiu]Ruby Docs[/url:2y8qpfiu] this topic (pssst! You can bookmark topics and access your bookmarks through your User Control Panel. The link is a the top left of each forum just below the list of Moderators. The bookmark button is hidden all the way at the bottom of each topic webpage in the footerbar.)
    • M

      Untrapped Error

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      220 Views
      Dan RathbunD
      @martinrinehart said: > 64 rescue => e > 65 rslt += e.to_s().chomp() > 66 end > Your local reference e receives a pointer to an Exception object from the rescue clause, not a String object. You should use the instance method Exception.message to get the exception's string, like this: 65 rslt << e.message.chomp() (As a side-note on Optimization, generally speaking, + and += String concatenation, require Ruby to create at least one extra String object than String append <<. Ruby internally converts a+=b to a=a+b, OR a+='literal' to a=a+'literal', so using += doesn't gain you anything over <<, and may be twice as slow or more, in a loop.)
    • M

      Yet Another WebDialog Gotcha

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      174 Views
      J
      @martinrinehart said: Yet Another WebDialog Gotcha Seems to be annogolous with... @unknownuser said: Yet another Microsoft Windows Bug ...yes web dialogs are quite the cruel irony of SketchUp i would say. We sure could use a good ol built-in GUI about now.
    • M

      Python/Ruby vs. Ruby/Python

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      285 Views
      M
      Don't think I want to dust off Decaf until I've got time to go after it. I forget where I put my mains in Java. There's tons of my Java on my site: http://www.MartinRinehart.com , including the original Decaf tokenizer. There's a whole new vocabulary (words, not tokens; phrases, not expressions; sentences, not statements; etc.) that I'll need to document before anyone could realize that I wasn't just babbling. See "The Project", my site, for more.
    • M

      Textarea line separators on Mac

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      346 Views
      M
      @unknownuser said: I personally see no productivity or functionality gains from bothering with each platforms newline patterns, unless you just want to. This isn't the file I want given the input textarea: [image: GfrM_two.jpg] You have to convert crlf to newline because Ruby converts newline to crlf as it writes the file on a PC. Ugh. # ta_sep.rb require 'sketchup' html=" <html> <body> <textarea id='ta'>one two</textarea> <script> onload = function() { location = 'skp;go'; } </script> </body> </html>" wd = UI;;WebDialog.new( "Test", true, "test", 400, 300, 100, 100, true ) wd.set_html( html ) wd.add_action_callback( "go" ) do | dlg, msg | val = wd.get_element_value( 'ta' ) # val.gsub!( /\r\n/, "\n" ) pn = UI.savepanel( "Save As ...", File.dirname(__FILE__), 't.txt' ) file = File.new( pn, 'w' ) file.puts( val ) file.close() end wd.show() I think this is correct cross-platform code if you uncomment the gsub!(). For this I be thanking you and Notepad++ (View/Show Symbol/Show All Characters). Ruby's lovely ability to handle everything with newlines, platform-independently, does not extend to text read from a browser's textarea widgets.
    • M

      Open URL on local disk

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      20
      0 Votes
      20 Posts
      7k Views
      Dan RathbunD
      @martinrinehart said: I've set single click to open. An HTM opens in Chrome. Hey Martin, what's the fullpath to the Chrome executable on your PC ??
    • M

      WebDialog.set_html() Gotchas

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      933 Views
      M
      "Any customer can have a car painted any color that he wants so long as it is black." H. Ford There is no doubt that JavaScript is the best language for code running in the browser. Ruby is absolutely the best choice for SketchUp plugins. For similar reasons we've chosen HTML and CSS. However, if you know a man whose pet Python is named Monty, you may infer something about his personal language choice. (Monty just reminded me that van Rossum works for Google. There's hope.)
    • M

      Debugging WebDialogs' .tmp Files

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      2k Views
      Dan RathbunD
      In a normal MSIE browser window, if an error occurs (and you have Internet Options > "Advanced" (tab) > "Browsing" (group) > "Display a notification about every script error" unchecked,) you will not see a Error Popup, but there wil be an error icon in the lower left corner on the Status bar. Clicking this icon will bringup the Error Popup dialog. If you have Visual Studio installed it will likely ask if you wish to Debug in VS.
    • M

      Ruby :symbols

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      163 Views
      M
      @thomthom said: What is off target and plain wrong? A question I can't answer until I can answer my own question: What's a symbol? The link was a good one but after a too-quick read I was better versed in what you could do with symbols that what a symbol was. In most languages there is a symbol table, under the covers. Ruby symbols seem to be bringing this capability forward, allowing us to add to the table in some way that I'm not sure I understand. Edit: make that "in some way I'm sure I don't understand." end edit Nagging questions: if "foo" is a variable name it will be in the symbol table and :foo will be a symbol. What about "foo.bar"? Is that a :foo plus a :bar, or is it :foo.bar?
    • M

      Does "C" equal "C" ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      666 Views
      Dan RathbunD
      @martinrinehart said: ... I stumbled acrossthe Ruby File.expand_path() method that looks like a better replacement for the little fixup() function I wrote. If you File.expand_path(__FILE__) you get the full path back to the root, on a Mac, or the drive, on a PC. Perfect! If you look back at the original thread, and reread more carefully, you'll see ThomThom told you to use File.expand_path() two weeks before you "stumbled across" it! I've been wondering why you didn't take his advice... (and do you have a copy of the 'Pick-Axe' Ruby book in chm format?)
    • M

      Matrix Multiplication Explained

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      761 Views
      TIGT
      That 'that' is manually rotating about a point and then scaling in a certain axis often gives quite different results from scaling in a certain axis then rotating about the same point That is that !
    • 1 / 1