ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • JavaScript to Empty Something

    4
    0 Votes
    4 Posts
    235 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.
  • Quickly finding groups/comps in an Entity Collection?

    24
    0 Votes
    24 Posts
    1k Views
    J
    @thomthom said: I take a few extra lines for readability any day. True, but "squish-the-code" is a fun exercise and I often learn something new. def xis(a);a.map{|e|xis(e.explode)if e.respond_to?('move!')};end (assuming no one has added move! to any of the built-in classes!)
  • [Obsolete] LibFredo6 3.0e (newer version available)

    32
    0 Votes
    32 Posts
    16k Views
    A
    NICE !!! THNKS FOR UPDATE...
  • Ruby Help for Components & Layers

    3
    0 Votes
    3 Posts
    298 Views
    thomthomT
    And if you want to create components, then you use model.definitions.add "newCompName" http://code.google.com/apis/sketchup/docs/ourdoc/definitionlist.html#add And then place an instance of the definition. http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#add_instance Instead of making a groups and then converting the group.
  • Default animation settings, a 2nd question

    9
    0 Votes
    9 Posts
    321 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.
  • Standing Seam Roof generator

    7
    0 Votes
    7 Posts
    819 Views
    HumpmetwiceH
    I don't know a easier way to do it but I do feel your pain!I did this for a friend of mind and he wanted "R" panels. !["R" Panel Roof](/uploads/imported_attachments/zn6g_Roof.gif ""R" Panel Roof")
  • Bad Parts - JavaScript: The Good Parts

    2
    0 Votes
    2 Posts
    236 Views
    M
    If you do not have the book, get the book. From my tutorial, Chapter 19: "Before we begin, I should state that we are not covering all of JavaScript here. We are covering the subset that JavaScript guru Doug Crockford identifies in his book, JavaScript: The Good Parts."
  • Trouble loading scripts outside Plugins directory

    5
    0 Votes
    5 Posts
    390 Views
    M
    Thanks Dan. I think I'll stick with your simplified solution. Works perfectly! Now I can keep my plugins separate from the ones I downloaded from other folks. Marc
  • Duplicate of component definition

    9
    0 Votes
    9 Posts
    389 Views
    P
    Hey Chris, We are the developers of the 4D Virtual Builder for Sketchup plugin Hope you already had the time to test-drive it. Since I'm not a native Ruby developer this forum has been a great help!
  • Calling Whaat and Fredo!! new MAC issues (SOLVED)

    94
    0 Votes
    94 Posts
    18k Views
    S
    Hi! I have followed the discussion but I have still problems with the icons and tools using the Bezier curve. Could anyone explain me which are the right steps? I have seen Fredo released a new .rb file called beziermain.rb but also overwriting that in the old folder BezierSpline1.3 I still don't see all the tools. HELP! thanks. Stef.
  • Google's New API Doc

    5
    0 Votes
    5 Posts
    284 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.
  • Control animation from own software?

    2
    0 Votes
    2 Posts
    216 Views
    M
    The camera is easy to position using Ruby and the API. Watch the first 30 seconds of my Airshow! movie for a good example. What is the requirement for a separate C++ program?
  • Vertices and selection

    9
    0 Votes
    9 Posts
    473 Views
    alexschreyerA
    Thanks for the replies. I'll have to get back to this later, so please don't think I am ignoring you... Cheers, Alex
  • Sketchup.write_default needs escaping?

    7
    0 Votes
    7 Posts
    347 Views
    M
    @thomthom said: Looks like it evaluates the string and treats the backslashes as special characters. I had no end of troubles with slashes. Finally implemented this none-too-clever code and all the bugs went away: =begin qq() and qq!() do these replacements; "'" -> "qq1" '"' -> "qq2" '/' -> "qq3" '\' -> "qq4" '\n' -> "qq5" '\r' -> "qq6" =end def self.qq( str ) return str.gsub( /\'/, 'qq1' ).gsub( /\"/, 'qq2' ).gsub( /\//, 'qq3' ).gsub( /\\/, 'qq4' ).gsub( /\n/, 'qq5' ).gsub( /\r/, 'qq6' ) end # of qq() def self.qq!( str ) str.gsub!( /\'/, 'qq1' ) str.gsub!( /\"/, 'qq2' ) str.gsub!( /\//, 'qq3' ) str.gsub!( /\\/, 'qq4' ) str.gsub!( /\n/, 'qq5' ) str.gsub!( /\r/, 'qq6' ) end # of qq!() These reversers complete the Ruby: def self.unqq( str ) # reverses qq() return str.gsub( /qq1/, '\'' ).gsub( /qq2/, '"' ).gsub( /qq3/, '/' ).gsub( /qq4/, '\\' ).gsub( /qq5/, '\n' ).gsub( /qq6/, '\r' ) end # of unqq() def self.unqq!( str ) # reverses qq!() str.gsub!( /qq1/, '\'' ) str.gsub!( /qq2/, '"' ) str.gsub!( /qq3/, '/' ) str.gsub!( /qq4/, '\\' ) str.gsub!( /qq5/, '\n' ) str.gsub!( /qq6/, '\r' ) end # of unqq!() These are the reversers in JavaScript: single_quote = String.fromCharCode( 39 ); double_quote = String.fromCharCode( 34 ); ford_slash = String.fromCharCode( 47 ); back_slash = String.fromCharCode( 92 ); function unqq( msg ) { s = msg.replace( /qq1/g, single_quote ); s = s.replace( /qq2/g, double_quote ); s = s.replace( /qq3/g, ford_slash ); s = s.replace( /qq4/g, back_slash ); s = s.replace( /qq5/g, '\\n' ); s = s.replace( /qq6/g, '\\r' ); return s; }
  • Python

    2
    0 Votes
    2 Posts
    216 Views
    thomthomT
    @dedmin said: Is this possible with SketchUP "this" - dancing robot? Or simply scripting Python in SU? Someone has been working on adding a Python layer to SU - but it'd interface with the Ruby layer, so it's slower than using Ruby directly. http://www.cosc.canterbury.ac.nz/greg.ewing/SuPy/
  • Does anyone think they can create this ruby?

    4
    0 Votes
    4 Posts
    455 Views
    S
    great code, works perfectly. thanks!
  • Setting camera eye

    8
    0 Votes
    8 Posts
    281 Views
    snicoloS
    Should be fixed soon, I have submitted the change and it needs to be picked up by the servers. thanks for the report. Simone.
  • [script] Sketchup 7.1 all hiden action :lol:

    12
    0 Votes
    12 Posts
    19k Views
    thomthomT
    @cjthompson said: Is it even possible for a plugin to add actions to Sketchup? No - but these where just constants. I was just wondering if a plugin had defined them to simplify things.
  • UI.start_timer Issues

    9
    0 Votes
    9 Posts
    586 Views
    chrisglasierC
    @thomthom said: Could be that the transformation done inside the timer block slows the iteration down to a point where you're getting a time close to what you expect. As this thread title seems to have morphed I want to ask other related questions. Is the timer different from an array because it does not call the next iteration until the transformation is complete? I am more concerned about sequence than precise timing. So would multiple transformations suffer/benefit from hardware efficiency equally - i.e. the sequencing will be correct? Thanks
  • Web dialog browser version

    6
    0 Votes
    6 Posts
    2k Views
    thomthomT
    @brett mcallister said: What I don't understand is when I open a web page in a web dialog you get scroll bars if I opened a webpage located on my hard drive no scroll bars?. The various render modes in IE triggers differently depending if the HTML page is loaded in a browser or in an embedded control such as webdialogs.

Advertisement