sketchucation logo sketchucation
    • Login
    1. Home
    2. azuby
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 23
    • Posts 305
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: D/Code - smells like IRB spirit (1.0 RC1)

      @unknownuser said:

      you must disable the load button until you finish the eval of the code as SU Ruby is not reentrant

      export html I think is for exporting the code highlighting and encode/decode for script encryption

      I also did something similar for SU5, before WebDialogs, with tab completion and aliases. if you want I can share the source as I dont have time to finish it 😎
      I don't think there is a need to disable the Load button, because there is less Javascript. So I build the page every time the user loads a file, changes the view or sends/executes his code. I know what will happen, if the user enters a infinite loop (or maybe a time consuming one) πŸ˜„ but still haven't tried it.

      It's a simple action that causes the error:

      • Run Sketchup
      • Call the d/Code console (click the Button or menu entry)
      • Click the Load button -> BOOM!
        That means, everything is done in the window when I can click the Load button. But maybe Sketchup is a bit slower and hasn't registered the callbacks. Really don't know.

      Export HTML is for exporting the current view without buttons and input field. If you have the "decoded" view and the output field, both will get exported.

      Encode/decode is simple. You know. πŸ˜„ For a bit more comfort.

      I'm interested in your code, if it is Ruby πŸ˜‰ (I guess it's not)

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Accessing the PDFs with Plugins

      OK guys, have a second look to Didiers download thread. I also tried to program an extension, but my solution creates a nested menu.

      azuby

      posted in Developers' Forum
      A
      azuby
    • D/Code - smells like IRB spirit (1.0 RC1)

      Tach (in Berlin we say "Tach"),

      we all know that the Ruby Console is a bit - umm - uncomfortable. And we all know IRB and Wirble (do we?) and maybe CodeRay. I try bringing back the IRB spirit to Sketchup.

      Here is a first screenshot of the UI:
      First screenshot of Sketchup Ruby Plugin d/Code
      Most of the stuff already runs. There is still a bad bug with the Load button. Pressing this button too fast will kill Sketchup. That's not cool, but i really do not know, why this takes place.

      We will see, maybe the output also reaches the level of Wirble.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: [Plugin] Plugins help script

      OK, here is my try for accessing help files out of Sketchup. It uses the some technics as Didiers script for showing the files, but my attempt scans the Directories in another way and recursively builds a nested menu structure.

      Unfortunately there needs to be a lot checking, because we all know, that we can not access existing menus later.

      Go to http://www.errorinitus.de/ > Software > PluginsHelp

      azuby

      posted in Plugins
      A
      azuby
    • [Plugin] CurrentDate 0.4

      CurrentDate got an update πŸ’š

      You now can let the Plugin doing the job of clicking the menu entry for update the values in the Shadow dialog. For that you can specify a refresh rate.

      Please keep in mind that Ruby uses green threads. I've made the experience, that CurrentDate will only update the settings, if you use Sketchup - by moving the mouse and so on.

      Navigate to http://www.errorinitus.de/ > Software > CurrentDate

      Hope, it helps,

      azuby

      posted in Plugins
      A
      azuby
    • RE: Newbie (to ruby) question

      Reading Excel files could be done by using roo.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Select (or deselect) Hidden Edges within an active selection

      Maybe HideEdges can help you. Have a look on my website (it's now in German AND English). Click the "Software" link and after the "HideEdges" link.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Xcode and Ruby function menu

      Hehe, blue? OK, maybe you really need half of a second. Time is money. But sex sells πŸ˜›

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Ruby console intruder

      "Behind": Change

      puts "foo"
      

      to

      puts "foo" if $DEBUG
      

      The other way would be:

      if $DEBUG
        puts "foo"
      end
      

      This also would be possible πŸ’š :

      puts "foo" unless !$DEBUG
      

      @Fredo6
      They still have Ruby 1.8.0 implemented since ... don't know - maybe Sketchup 4?

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Plugins Drop Down menu is wrong

      I spoke about Gaieus' idea of renaming files for disabling their contained Ruby plugins some postings before - not about the Organizer (because we know what wents wrong with the Menu class and so on). A Plugins (or Tools) menu with 4711 entries communicates to me: "The user has very, very, very complex modells and really needs all these plugins" or "The user thinks, the plugins might be useful, but he has resigned and accepts, that his Sketchup isn't really slim as it could be" And I think, each developer should care about his "victims" πŸ˜‰ that they have as much comfort as possible. That's the reason why I support the idea of exceptions instead of having "only" "scripts" Most of our "scripts" are tools and plugins (and all in all: extensions), so we should provide them this way.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Xcode and Ruby function menu

      It's possible to hook into all methods like all Ruby debugger are doing. And we also need to change $STDOUT, $STDIN and $STDERR. So it would be possible to have an own console. But a debugger talking to NetBeans hm ... And all still works for XCode and TextMate?

      Don't know, why Ruby programmers use "for" statements - they aren't "the Ruby way" πŸ˜„ Ruby provides iterators and the "each" (each_index, each_with_index, reverse_each, to, upto, downto, times) method.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Ruby console intruder

      It's just a warning, not an error, so it isn't critical. You can edit line 96 of trim_extend.rb on your own. I think, there you will have a statement formated like this:

      foo bar baz
      

      You need to edit it to

      foo bar(baz)
      

      or

      foo(bar(baz))
      

      . Or just write the line down here and we'll correct it.

      The other garbage ... well it's not easy to find where it comes from if you have lots of Ruby scripts in your Sketchup folders. In "Tools/sandboxtools.rb" you can find some statements, lines 31, 36, 40, 44 beginning with "puts" Behind the statement you can write

      if $DEBUG
      

      The other thing with "dirs=" you can find in "Tools/totd.rb", line 86. Put the same string behind the statement.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Ruby console intruder

      ... and be careful with String methods:

      (eval);217; warning; string pattern instead of regexp; metacharacters no longer effective
      

      Would be possible to overwrite the String methods, converting String arguments to Regexp objects. If anyone is interested ...

      Printing out "'garbage" debugging messages' without having $DEBUG enabled shouldn't be done. We all know, that the Ruby console is a time consumer because of it's auto-scrolling.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Xcode and Ruby function menu

      Has anybody tried the Netbeans 6.1 IDE (there also is a Ruby-only IDE)? Till now I haven't had any breaks in syntax highlighting with that IDE (you know Scite? ^^).

      One year ago I tried XCode, but it wasn't good for me. I also tried TextMate - seemed to have a good syntax highlighting (but is it really free? I don't think so.)

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Plugins Drop Down menu is wrong

      Well, if you think, renaming script files is more user friendly against a simple checkbox ... go on πŸ˜„ (especially for user not beeing admin on their machine). They won't "feel" the "layer of complexity" if programmers would switch-on their -> extensions by default. Using "Tools" and/or "Plugins" folder seems to be a secret of Google and should be less important to users.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Reverse faces to match... ruby.

      I see ... I haven't used the tool since two or three Sketchup versions. Google modified the code for language things, that causes the error. I go into it the next days.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Reverse faces to match... ruby.

      Well, click the "Software" link on my website and there you will have it all in German AND English.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Reverse faces to match... ruby.

      One idea: If none of the faces has material applied, select all faces, go to Window > Element information, click on the material (the square), chose a material. So you will have all your faces with material on the "white side" Than use the FFlipper tool, than remove the material on all faces.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Plugins Drop Down menu is wrong

      There's nothing special with programmers πŸ˜„ You also can become one of us πŸ˜„ Here's your first attempt:

      Choose one of the Ruby scripts in your Sketchup Plugins / Tools folder, which you do not need often. Copy it to the Desktop (to be able to restore it later). Now create a folder in the Plugins / Tools folder; i.e. the choosen Ruby script was "abc.rb" it's clever to name the folder "abc" Move the "abc.rb" into the new folder. Create a new text file (with Notepad) in your Plugins / Tools folder, maybe "abc.rb", but better "abc_loader.rb" (or "the_simpsons.rb" πŸ˜„ ). Copy the code I wrote down to that file AND replace the upper-cased terms. In the "abc" case it could be:

      require 'sketchup.rb'
      require 'extensions.rb'
      filename = File.basename(__FILE__)
      if(not file_loaded?(filename))
        ext = SketchupExtension.new "Philip's ABC Plugin", "abc/abc.rb"
        ext.description = "Philip's ABC Plugin is just an example on how to program Sketchup Ruby extensions."
        ext.creator = "Philip"
        ext.copyright = "Oh well, ask me again in some years..."
        ext.version = "47.11"
        Sketchup.register_extension ext, false
        file_loaded filename
      end
      

      Save the file, (re-)start Sketchup, look into the Preferences I mentioned in my last posting. The "true" / "false" in the third-last line says Sketchup: Do not load this extension by default. So the checkbox for the extension in the Preferences isn't checked.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Notes Ruby?

      Or if you need a more complex thing (like version control for tracking down your model changes), stay tuned πŸ˜„ and see this. At this moment I'm working on that.

      azuby

      posted in Developers' Forum
      A
      azuby
    • 1
    • 2
    • 7
    • 8
    • 9
    • 10
    • 11
    • 15
    • 16
    • 9 / 16