sketchucation logo sketchucation
    • Login
    1. Home
    2. duke
    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 6
    • Posts 18
    • Groups 1

    Topics

    • D

      Get last image export settings?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      76 Views
      Dan RathbunD
      FYI... I have a bug issue logged that Sketchup::read_default() cannot return DWORD values. Basically the method assumes anything you want to read was written with Sketchup::write_default(), which inspects objects into evaluatable strings before storing them. So.. Sketchup::read_default() is stupid and always tries to run the stored values back through Ruby's eval() without Type checking. When a error occurs it seems the method's rescue block just returns nil. So you'll need to use the WIN32OLE class ("win32ole.so" file,) and the Windows Scripting Host interface to read registry values. See: [Plugin Library] Win32API and Win32OLE so files
    • D

      VCB greyed out

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      293 Views
      Dan RathbunD
      Duke, ya need to get your files and folders organized (so you stop using global variables.) Separate the code into 3 files, thus: file: "Plugins/CKD_Thicken_ext.rb" ### # "Plugins/CKD_Thicken_ext.rb" require('sketchup.rb') require('extensions.rb') module CKD module Thicken @@plugin = SketchupExtension.new "Thicken", "CKD/Thicken/CKD_Thicken.rb" @@plugin.version = '1.0' @@plugin.creator = 'CKD (aka "Duke")' @@plugin.copyright = '2012, CKD' @@plugin.description = 'Uses JPP to thicken the select face/s directly or inside the selected groups' Sketchup.register_extension( @@plugin, true ) end # module Thicken end # module CKD file: "Plugins/CKD/CKD_module.rb" # ------------------------------------------------------------------------- # "Plugins/CKD/CKD_module.rb" module CKD @@topmenu = UI.menu('Plugins') @@submenu = @@topmenu.add_submenu('CKD') @@menuitem = {} def self.menuitem() return @@menuitem end def self.submenu() return @@submenu end def self.topmenu() return @@topmenu end end # module CKD file: "Plugins/CKD/Thicken/CKD_Thicken.rb" # ------------------------------------------------------------------------- # "Plugins/CKD/Thicken/CKD_Thicken.rb" require('sketchup.rb') require('jointpushpull.rb') require('CKD/CKD_module.rb') module CKD;;Thicken @@tool = nil class ThickenTool def initialize(caller_class) @caller = caller_class @thickness = 100.mm end def activate @model = Sketchup.active_model @selected = @model.selection Sketchup.set_status_text("Thickness", SB_VCB_LABEL) Sketchup.active_model.active_view.invalidate end def deactivate(view) view.invalidate @model = nil @selected = nil end def resume(view) @model = Sketchup.active_model @selected = @model.selection Sketchup.set_status_text("Thickness", SB_VCB_LABEL) Sketchup.active_model.active_view.invalidate end def suspend(view) nil end def onUserText(text, view) UI.messagebox("what") # call method thicken() here ? end def enableVCB? return true end def thicken model.start_operation("Thicken") # # change model here # model.commit_operation rescue Exception => e model.abort_operation puts("Thicken Error!\n#{e.message}") puts(e.backtrace) end end #Class ThickenTool class << self # Proxy class def tool() if @@tool.nil? @@tool = CKD;;Thicken;;ThickenTool.new(self) end # return @@tool # end end # Proxy class # RUN ONCE unless file_loaded?( 'CKD;;Thicken' ) CKD;;menuitem["Thicken"]= CKD;;submenu.add_item("Thicken") { Sketchup.active_model.select_tool( CKD;;Thicken;;tool ) } file_loaded( 'CKD;;Thicken' ) end end # module CKD;;Thicken
    • D

      Material area?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      1k Views
      thomthomT
      And remember that a group or component can be skewed, affecting the area calculation as well.
    • D

      Reset floating window positions?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      4
      0 Votes
      4 Posts
      1k Views
      D
      Thanks for the tips, although it seems the Style window does not use standard Windows dialog boxes (which I suppose it's why it's one I can't do alt+space m on, which works for the others). Damn!
    • D

      Reloading component - looses all attributes

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      10
      0 Votes
      10 Posts
      1k Views
      GaieusG
      @plot-paris said: by the way, wasn't it possible to to save a component (by context click > save as) in SU6? Indeed it was (or actually still is)
    • D

      CURRENT to snap - not working

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      4
      0 Votes
      4 Posts
      867 Views
      D
      Thanks Chris! That worked. Would have never had known there was an issue.
    • 1 / 1