sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Any info about DCL_Technology for SU used in RPTOOLS

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 395 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Al HartA Offline
      Al Hart
      last edited by

      @unknownuser said:

      Hi all!
      It is very cool , RPTOOLS uses dcl file to show dialog in SketchUp.
      Any info about using DCL in SU_Ruby ?

      Thanks!

      DCL - based loosely on a Dialog Control Language first used with AutoCAD 15 or so years ago - makes it easy to create dialog boxes for SketchUp ruby.

      The basic interface is through global variables. For example, if you want to make a dialog control which sets a distance to use for something, you use a value box which looks like the X box below:

      http://wiki.renderplus.com/images/4/42/Stretch-dimensions.png

      You use this code in the DCL:

      
      value_box
      {
      	label = "X;";
      	global_variable =  rrptools_stretch_new_width;
      	format = "D";
      	command = rb_stretch_selection("X");
      }
      
      

      The value in the box is automatically stored in a global variable named 'rrptools_stretch_new_width', the value box automatically displays the value in the format of the SketchUp model (inches, mm, etc.), and the ruby command 'rb_stretch_selection("X")' is automatically executed whenever the value is changed. (You do not need to execute a ruby command every time a value is changed. You can wait until the user taps OK. But sometimes you want to do something for each change or up and down tick).

      The up and down sliders are automatically created for each value box.

      The ruby command would look something like this:

      
      def rb_stretch_selection(swhat)
      	if (swhat == "X")
      		rrptools_stretch_new_width = get_global_double("rrptools_stretch_new_width)
      		# do something with rrptools_stretch_new_width
      	end#if
      end#def
      
      

      Unfortunately DCL only works with Windows currently. We hope to create a MAC version, but have not started work on it yet. Let us know if you want more information on the RPS DCL Development Kit.

      We have used WebDialogs for some of our applications, hoping to port them to the Mac more easily. And WebDialogs might be best for most SketchUp developers. The RPS DCL development Kit includes a C++ DLL which allows you to access the dialogs and global variables from C-code as well. However, the cost may be to high for many projects.

      Al Hart

      http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
      IRender nXt from Render Plus

      1 Reply Last reply Reply Quote 0
      • W Offline
        wikii
        last edited by

        Thank you very much for the info, AI!

        Is it possible to show me a little demo rb_file about how to use RpTools.dll to load a dcl file?

        Pardon me,if you feel my request is unreasonable,for I want to know more about it eagerly.

        1 Reply Last reply Reply Quote 0
        • Al HartA Offline
          Al Hart
          last edited by

          @wikii said:

          Thank you very much for the info, AI!

          Is it possible to show me a little demo rb_file about how to use RpTools.dll to load a dcl file?

          Pardon me,if you feel my request is unreasonable,for I want to know more about it eagerly.

          I put some samples on the Render Plus Forum if you want to try some things out:

          Al Hart

          http:wiki.renderplus.comimageseefRender_plus_colored30x30%29.PNG
          IRender nXt from Render Plus

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement