sketchucation logo sketchucation
    • Login
    1. Home
    2. driven
    3. Posts
    ℹ️ 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 43
    • Posts 2,966
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Disable popup notification

      @rv1974 said:

      ...There must be option to disable it

      If you disable the extension I believe it's notification ceases...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Paint bucket not recalling colors in model....

      the drawing has issues because nothing is 'grouped'...

      if you import and lock your image the geometry won't stick to it nor inherit it's 'material'...

      your also painting back faces which can lead to grief...

      john

      posted in SketchUp Bug Reporting
      D
      driven
    • RE: Ugh....Where are my materials in 2017?

      Your looking at 2 different Libraries...

      the second is your hard drive which SU hasn't used for years unless you or a rouge plugin makes it...

      check in your Home/Library/ from Finder, they are in there...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Ugh....Where are my materials in 2017?

      Are the Materials showing in the SU 'Color' Palette?

      How did you 'load' them and from where?

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: How to increase the Undo buffer?

      save regularly and use File >> Revert to 'jump' back to that last save...

      no other way I know of, unless your writing your own ruby scripts...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: 2017: webdialog changes

      @unknownuser said:

      ...The webdialogs still work but I noticed some changes in behavior (scaling issues - maybe due to my crappy code) ...

      it may not be your code...

      there are reports that v17 sets the version of IE to use in all versions of SU i.e. it has an affect on <v17 as well...

      I believe that if you don't have the IE version SU sets then IE will run in compatibility mode for all WebDialogs that don't include meta date...

      john

      posted in Developers' Forum
      D
      driven
    • RE: [Plugin] Add Icons [for all SU files on mac]

      Finally SketchUp has added it's own icons for mac with the release of v17...

      not the same quality [imho] but it's native and I can finally stop updating this plugin....

      john

      posted in Plugins
      D
      driven
    • RE: 2017 is here

      Thanks for chiming in Mark H...

      shame Windows gets better results than mac, but I guess they have lots of other OS issues outside of SU...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: SU 2017 anything new in the Ruby API?

      @unknownuser said:

      ...it groups them together, moves the group, then explodes the group...

      exploding now deletes all references to the group entities, i.e. they all are 'deleted entities' after the explode...

      in one of mine I 'now' store the face.bounds.center.z and then after exploding re-find faces using that as a conditional...

      I believe the former ability to 'hold' the reference was a SU 'hack' and some of these are being 'put right'...

      john

      posted in Developers' Forum
      D
      driven
    • RE: Visualizer for SketchUp

      the 2016 tricks will not work for this or any plugin that cannot be updated to run on Ruby 2.2...

      there is no legal way around this for encrypted extensions...

      john

      posted in Extensions & Applications Discussions
      D
      driven
    • RE: 2017 is here

      @juju said:

      ...keep IE installed as SketchUp uses it...

      SU now uses an embedded version of Chrome and HTMLDialogs, most plugins that use WebDialogs will not be updated to use it yet and still need IE or Safari to be up to date...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: 2017 is here

      @pilou said:

      But curiously Visualizer not! :shock:

      no mystery there, Visualizer would need to be updated to Ruby 2.2 and development was frozen so it won't be...

      it is probably a very easy fix if you can talk them into it...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: 'protecting' a dynamic component?

      hi David...

      are you still running SU v8 ?

      if so it may be a ruby 2 issue with my example...

      I've had no time to follow up on this concept [sorry yoni] ...

      john

      posted in Dynamic Components
      D
      driven
    • RE: Extension to project 3D geometry to 2D geometry

      have you looked at Flatten to Plane?

      http://sketchucation.com/forums/viewtopic.php?p=281320#p281320

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Animation SUalive extension. May you test beta version?

      @unknownuser said:

      ...such WebDialog is really fully modal as it locks the full screen.

      it is a 'faux' modal window, as in 'fake' or 'false'...

      @unknownuser said:

      The user can only interact with your own controls and even not the system - shortcuts perhaps?

      it really only effects the mouse clicks on the dialog
      @unknownuser said:

      Are minimize and maximize and close buttons hidden? maybe dialog.navigation_buttons_enabled does?

      the window buttons that are shown work for the dialog, and cover the SU ones below it...

      @unknownuser said:

      Html '<title> TOP more= <<MORE </title>'. Never seen such construction. May you explain?

      it's ruby HEREDOC and works the same as %Q allowing the use of quotes inside the strings and dynamic content from ruby calls...

      it's useful for html as you can have mixed quotes for javascript or css in the strings...

      john

      posted in Developers' Forum
      D
      driven
    • RE: Animation SUalive extension. May you test beta version?

      yes it works as you expect...

      BTW. did you look at this old post in your search http://sketchucation.com/forums/viewtopic.php?p=418498#p418498, the code would need some updating for ruby2 but it works if I remove the dot in the pathnames...

      I did develop the idea further to use in a mac plugin called Add_Icon, it's in the store and not scrambled...

      john

      posted in Developers' Forum
      D
      driven
    • RE: Animation SUalive extension. May you test beta version?
      Start debug ------------------------------------------------2.0.0
      --------------------------------------------------------debug End
      
        Dlg_debug returns true
      
      Start debug ------------------------------------------------2.0.0
      --------------------------------------------------------debug End
      
        Dlg_debug returns false
      

      your 'debug End' is still being called too early...

      did you notice I had moved it in the code for the first gif?

      john

      posted in Developers' Forum
      D
      driven
    • RE: Animation SUalive extension. May you test beta version?

      it this what your after?

      maybe this.gif

      if so you need to move the message box into the callback, or else it shows before the user selection...

      you still dont get it.gif

      here's the code for the first gif...

      # added a couple more puts to see what happens...
      module YDco_debug
        module YDalv
          class << self
             def main_method
               puts 'main_method() entry point'
               bool_first = true
               if bool_first
                 puts '..first true'
                 bool_second = false
                 if bool_second
                   puts '....second true'
                 else
                  # added to show ruby gets here
                   puts '....second false'
                   lics = YDalv;;Dlg_debug.new
      						 str_msg = "....Dlg_debug returns " + lics.load_dialog().to_s
      						 # UI.messagebox(str_msg)
      						 puts str_msg
                   # if lics.load_dialog
                     # puts '....Dlg_debug returns true'
                   # else
                     # puts '....Dlg_debug returns false'
                   # end
                 end
               end
             end
          end
      
          class Dlg_debug < UI;;WebDialog
            def initialize
              # pre-define variable
              @is_ok = 'waiting'
              puts '......class initialize entry'
              super 'SUalive debug', false, 'SUalvDebug', 512, 256, 500, 500, false
              str_html = '
                <!DOCTYPE html>
                     <html>
                     <head>
                        <meta content="charset=utf-8" http-equiv="content-type">
                        <meta content="Yes" http-equiv="MSThemeCompatible">
                        <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
                        <script type="text/JavaScript">
                           function jsDebugSwitch(obj) {
                              document.getElementById("btnContinue")
                                 .disabled = !obj.checked
                           }
      
                           function jsDebugTellMe(obj) {
                              var isOK = (obj.id == "btnContinue");
                              //alert(isOK);
                              window.location = "skp;qwerty@" + isOK
                           }
                        </script>
      
                        <title>
                        </title>
                     </head>
      
                     <body>
                        <div style="width; 496px; font-family; Arial">
                           <div style=
                           "border; solid 1px #CECECE; padding; 0px 10px 0px 10px; font-family; Arial; font-size; 14px; width; 470px; height; 150px; text-align; justify; overflow; auto">
                           Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam gravida
                           nunc metus, id vulputate metus rutrum at. Curabitur et pretium arcu. Morbi
                           vehicula arcu a nisl consequat, non vulputate ligula congue. Aenean sit
                           amet orci nec leo cursus tempus. Nulla facilisi. Mauris vestibulum elit
                           magna, ut pellentesque enim tincidunt placerat. Nunc volutpat varius
                           maximus. Praesent bibendum convallis tellus ut fringilla. Vestibulum
                           dignissim lacinia sapien, sed porttitor justo dictum quis. Curabitur
                           laoreet nisl nunc. Ut egestas magna eget laoreet gravida.
                           </div>
      
      
                           <div style="width; 482px; margin; 20px 7px 0px 7px; font-size;smaller">
                              <div style="float; right">
                                 <button disabled id="btnContinue" onclick="jsDebugTellMe(this)" style=
                                 "margin-right; 7px">Continue</button> <button id="btnExit" onclick=
                                 "jsDebugTellMe(this)">Exit</button>
                              </div>
                              <input onclick="jsDebugSwitch(this)" type="checkbox">Check me please
                           </div>
                        </div>
                     </body>
                     </html>'
              puts '......' + str_html.length.to_s
              set_html(str_html)
              puts '......add_callback'
              add_action_callback('qwerty') do |wdialog, str_params|
                puts '........callback ' + str_params
                @is_ok = (str_params == 'true')
                puts '........isOk ' + @is_ok.to_s
                wdialog.close
                puts '........close'
                str_msg = "....Dlg_debug returns " + @is_ok.to_s
      	 UI.messagebox(str_msg)
                puts "\n --------------------------------------------------------debug End"
              end
            end
      
            def load_dialog
              puts '......load_dialog entry'
              show_modal
              puts '......show_modal back'
              puts '......isOk ' + @is_ok.to_s
              @is_ok
            end # def
          end
      
          puts 'Start debug ------------------------------------------------' + RUBY_VERSION.to_s
          puts 'call main_method()'
          main_method
          # move this to the callback...
          # puts '--------------------------------------------------------debug End'
        end
      end
      
      

      john

      posted in Developers' Forum
      D
      driven
    • RE: Animation SUalive extension. May you test beta version?

      @whydi said:

      ... I would have liked you to run one time clicking 'continue' button the another clicking 'exit' button then show me the results in your console...

      the webDialog works in both scripts, but debug code doesn't write to console when you expect...

      it runs on load and returns false because you haven't defined @is_ok

      Start debug ------------------------------------------------2.0.0
      Dlg_debug returns false
      --------------------------------------------------------debug End
      

      you need to add a timer if you want to wait for the dlg's action callback...

      john

      posted in Developers' Forum
      D
      driven
    • RE: Animation SUalive extension. May you test beta version?

      I reformatted your code so I could follow it, and pre-defined @is_ok...

      it appears to work as far as I can follow what you might want...

      Start debug ------------------------------------------------2.0.0
      call main_method()
      main_method() entry point
      ..first true
      ....second false
      ......class initializeentry
      ......1967
      ......add_callback
      ......load_dialog entry
      ......show_modal back
      ......isOk waiting
      ....Dlg_debug returns true
      --------------------------------------------------------debug End
      
      ........callback true
      ........isOk true
      ........close
      
      
      # added a couple more puts to see what happens...
      module YDco_debug
        module YDalv
          class << self
             def main_method
               puts 'main_method() entry point'
               bool_first = true
               if bool_first
                 puts '..first true'
                 bool_second = false
                 if bool_second
                   puts '....second true'
                 else
                  # added to show ruby gets here
                   puts '....second false'
                   lics = YDalv;;Dlg_debug.new
                   if lics.load_dialog
                     puts '....Dlg_debug returns true'
                   else
                     puts '....Dlg_debug returns false'
                   end
                 end
               end
             end
          end
      
          class Dlg_debug < UI;;WebDialog
            def initialize
              # pre-define variable
              @is_ok = 'waiting'
              puts '......class initializeentry'
              super 'SUalive debug', false, 'SUalvDebug', 512, 256, 100, 50, false
              str_html = '
                <!DOCTYPE html>
      					<html>
      					<head>
      						<meta content="charset=utf-8" http-equiv="content-type">
      						<meta content="Yes" http-equiv="MSThemeCompatible">
      						<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
      						<script type="text/JavaScript">
      							function jsDebugSwitch(obj) {
      								document.getElementById("btnContinue")
      									.disabled = !obj.checked
      							}
      
      							function jsDebugTellMe(obj) {
      								var isOK = (obj.id == "btnContinue");
      								alert(isOK);
      								window.location = "skp;qwerty@" + isOK
      							}
      						</script>
      
      						<title>
      						</title>
      					</head>
      
      					<body>
      						<div style="width; 496px; font-family; Arial">
      							<div style=
      							"border; solid 1px #CECECE; padding; 0px 10px 0px 10px; font-family; Arial; font-size; 14px; width; 470px; height; 150px; text-align; justify; overflow; auto">
      							Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam gravida
      							nunc metus, id vulputate metus rutrum at. Curabitur et pretium arcu. Morbi
      							vehicula arcu a nisl consequat, non vulputate ligula congue. Aenean sit
      							amet orci nec leo cursus tempus. Nulla facilisi. Mauris vestibulum elit
      							magna, ut pellentesque enim tincidunt placerat. Nunc volutpat varius
      							maximus. Praesent bibendum convallis tellus ut fringilla. Vestibulum
      							dignissim lacinia sapien, sed porttitor justo dictum quis. Curabitur
      							laoreet nisl nunc. Ut egestas magna eget laoreet gravida.
      							</div>
      
      
      							<div style="width; 482px; margin; 20px 7px 0px 7px; font-size;smaller">
      								<div style="float; right">
      									<button disabled id="btnContinue" onclick="jsDebugTellMe(this)" style=
      									"margin-right; 7px">Continue</button> <button id="btnExit" onclick=
      									"jsDebugTellMe(this)">Exit</button>
      								</div>
      								<input onclick="jsDebugSwitch(this)" type="checkbox">Check me please
      							</div>
      						</div>
      					</body>
      					</html>'
              puts '......' + str_html.length.to_s
              set_html(str_html)
              puts '......add_callback'
              add_action_callback('qwerty') do |wdialog, str_params|
                puts '........callback ' + str_params
                @is_ok = (str_params == 'true')
                puts '........isOk ' + @is_ok.to_s
                wdialog.close
                puts '........close'
              end
            end
      
            def load_dialog
              puts '......load_dialog entry'
              show_modal
              puts '......show_modal back'
              puts '......isOk ' + @is_ok.to_s
              @is_ok
            end # def
          end
      
          puts 'Start debug ------------------------------------------------' + RUBY_VERSION.to_s
          puts 'call main_method()'
          main_method
          puts '--------------------------------------------------------debug End'
        end
      end
      
      

      john

      posted in Developers' Forum
      D
      driven
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 148
    • 149
    • 5 / 149