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

    Topics

    • D

      Changing scenes from Ruby

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      605 Views
      D
      Thanks Rick and Jim that helped!
    • D

      User defined DC functions

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      23
      0 Votes
      23 Posts
      5k Views
      scottliningerS
      @xrok1 said: is it possible to have an alert popup with a link in it? No, unfortunately.
    • D

      User defined functions

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      258 Views
      D
      or can I have something like this, when I leftclick on any object, it opens a webdialog?
    • D

      Sketchup game

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      451 Views
      chrisglasierC
      @dhruv said: How can I load different .skp files to my game from webdialogue?(I want to do this cause I dont want to go every time to drop down menu from plugins and load the map) Not truly professional I'm sure but this works #RUBY @dlg.add_action_callback("load") {|d, p| a= p.split(",") subDir ="Components/NamesetComponents/" fileName = a[0]+".skp" model = Sketchup.active_model entities = model.active_entities theX = Integer(a[1]).mm theY= Integer(a[2]).mm theZ = Integer(a[3]).mm point = Geom;;Point3d.new theX,theY,theZ txyz = Geom;;Transformation.new point path = Sketchup.find_support_file fileName, subDir definitions = model.definitions componentdefinition = definitions.load path instance = entities.add_instance componentdefinition, txyz theDegrees = Integer(a[4]).degrees theAxis = a[5] rv = Geom;;Vector3d.new(0,0,1) if theAxis == "z" rv = Geom;;Vector3d.new(0,1,0) if theAxis == "y" rv = Geom;;Vector3d.new(1,0,0) if theAxis == "x" tr = Geom;;Transformation.rotation(Geom;;Point3d.new(instance.bounds.center), rv, theDegrees) instance.transform! tr } //JAVASCRIPT function loadSkpFile(){ param = new Array(theFile,theX,theY,theZ,rz,theAxis) param = param.join(",") window.location.href = 'skp;load@'+param } @dhruv said: How can I open a web - browser by left clicking on the model? (Something like onclick function from maybe dynamic components) As I understand it, you can do it with a selection observer, but I haven't figured out the code for that. Hope this is useful. Chris
    • D

      Advanced Ruby Sketchup

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      268 Views
      D
      Oh , I just saw Scott did upload his script, anyways we can have general discussions for developers around and feedbacks of what can be done further with this kind of simulation. Cheers, Dhruv
    • 1 / 1