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

    Topics

    • S

      Web dialog pass data from Ruby to webdialog

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      2k Views
      A
      That is because you "kill" the document when you do document.write(query). Look at the documentation of document.write. This works: @name = "the name" @description = "the description" dialog = UI;;WebDialog.new("Details", true, "sachi_pluginname_dialogname", 410, 875, 1030, 0, true) dialog.add_action_callback("pass_data") { |dialog, htmlpage| js = "set_details(#{@name.inspect}, #{@description.inspect})" # It's not java. dialog.execute_script(js) } dialog.set_file 'C;\Program Files\Google\Google SketchUp 8\Plugins\set_id\details.html' dialog.show() <html> <head> <script> function callRuby(htmlpage) { // Declare the variable with "var" so that it is not global. var query = 'skp;pass_data@' + htmlpage; window.location.href = query; } function set_details(a, b){alert(a); // Example 1 var text = document.createTextNode(a); document.getElementById("detail1").appendChild(text); // Alternative // document.getElementById("detail1").innerHTML = a; // Example 2 document.getElementById("detail2").value = b; } </script> </head> <body> <div id="detail1"></div> <input id="detail2" /> </body> <script> // If you will access element in the page, you need to do this after the page (body) has loaded. callRuby("pull_selection_count"); </script> </html>
    • S

      How to draw parallel lines

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      4k Views
      TIGT
      Smustard.com's offset.rb adds an ' .offset' methods faces/edges/arcs/curves etc. That should give you some ideas at least... My ExtrudeEdgesByOffset tool also has some similar code that you could think about - however the easy way to offset edges is if they belong to a face, and are therefore definitely coplanar... Instead of entities.add_edges(array) you might be better using entities.add_curve(array) to make the offsetting easier, if you want separate edges later you can always explode the curves in code...
    • S

      Web access for 3D model

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      182 Views
      Chris FullmerC
      Ahh, I forgot that LightUp has a web player. Your client would need to install a viewer though. But that is minimal. That would be a great option!
    • S

      Offset a line Ruby command

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      5k Views
      TIGT
      You can replicate an offset for a face. The code is not so simple. Install my old tool https://sketchucation.com/pluginstore?pln=TIG_Smart_offset Read the code and try to understand how it works... It's somewhat more complicated than you need, but you should be able to extract what you need...
    • S

      Calculating angle between a line and North

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      2
      0 Votes
      2 Posts
      276 Views
      Jean LemireJ
      Hi Sachi, hi folks. By default, the North direction is along the green axis. If you did not change it, measure the angle between your line and the green axis. After clicking on the line to start the measurement procedure, slide the cursor on the protractor to get a snap from the green axis. This allows you to get the angle, even if the line doesn't intersect the green axis. Just ideas.
    • S

      Layer controllability over html web dialog box

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      683 Views
      J
      sachi - See also the VisMap plugin. http://sketchucation.com/forums/viewtopic.php?f=323&t=28782#MartinRinehart
    • S

      Add entities to a layer

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      86 Views
      S
      thank you very much for the detailed explanation TIG. It cleared the doubted areas about the layers.
    • S

      An animation for a walk through in a model using ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      89 Views
      Dan RathbunD
      @sachi said: User has to change the scene(click on the scene tab) manually to display the animation(to go to the next scene). No the user chooses from the menu: View > Animation > Play For Ruby YOU use the Animation class. Or just change the selected_page via the Pages collection.
    • S

      Web Dialog: Trouble passing string from ruby to javascript

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      1k Views
      S
      Thank you very much it works just fine
    • S

      Sketchup and ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      432 Views
      S
      Thank you very much TIG and kwalkerman. I have tried some simple codes.And the tool interface and pickhelper will be just fine for the task. But now it raised a problem. I want to select a whole sketchup entities object, as one object. So that when I click anywhere on that object (like a house or a building), the same data record will be retrieved from the database. The database contains a record for each house. Do you have any idea about this? Thank you
    • 1 / 1