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

    Posts

    Recent Best Controversial
    • RE: Trying to Display a Help File (Help.jpg)

      This is what finally worked:

       def dowelHelp
            dowel_help_File = File.join(File.dirname(__FILE__),"K2_ToolsSupportFiles","k2ws_DowelHelp.html")
            UI.openURL("file;///#{dowel_help_File}")
            UI.messagebox("Dowel Help Complete " + dowel_help_File.to_s)
          end #def dowelHelp
      

      The html file was:

      <!DOCTYPE html>
      <html>
      <body>
      <p>
      <img src="K2_ToolsDowelHelp.png" > 
      </p>
      </body>
      </html>
      

      Thanks
      Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: Trying to Display a Help File (Help.jpg)

      Well I wrote a htlm file and placed it in the same dir as the Dowel help file and when I click on the htlm file the Help picture opens. However I have not yet accomplished this from inside my ruby script.

      def dowelHelp
            UI.openURL("file;///K2WS_Tools/k2ws_DowelHelp.html")
            UI.messagebox("Dowel Help Complete")
          end #def dowelHelp
      

      This does not produce an error message and the UI.messagebox following the open file displays so the code completes running but no help file picture.

      Suggestions

      Thanks
      Keith

      posted in Developers' Forum
      K
      ktkoh
    • Trying to Display a Help File (Help.jpg)

      I have tried this method to display a help file for the user. I get no error message and the screen flashes like something is happening but the picture is not open in the browser as I expected.
      Any Suggestions?

      def dowelHelp
            self.k2_Tools_help_Path
            @helpfile = "K2_ToolsDowelHelp.jpg"
            fullpath = File.join(@base_path,@rel_path,@helpfile)
            UI.openURL(fullpath)
          end #def dowelHelp
      

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: [Plugin] Comp2LayerScene

      Released Version 2.0 To the SketchUcation Store or see original post for new file:

      Note: If you are using an older version of SketchUp (7) change the rbz extension to zip to use the file

      1. The program now makes the orthographic views and thus you no longer need the "Make Ortho Views" plugin

      2. The prefix for the layer name is completely optional.

      3. The drawing views are offset so the main view can be on layer0.
        This makes it easy to use the drawing scenes for a model that was drawn without separating components on individual layers

      4. Added the make a new hidden layer command for the users convenience

      Keith

      posted in Plugins
      K
      ktkoh
    • RE: [Plugin] Add Layer [1.1.0]

      Yes it is fixed now.

      Keith

      posted in Plugins
      K
      ktkoh
    • RE: [Plugin] Add Layer [1.1.0]

      I downloaded this plugin from the SU Store for the purpose of learning the SKUI interface.
      However while testing I was not able to get the check box "Layer visible on selected Scene only" to create a new layer.

      Error; #<NameError; undefined local variable or method `txt_LayerName' for JF;;AddLayer;Module>
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;155;in `add_layer'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;110;in `block in main'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;82;in `call'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;82;in `block in trigger_event'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;78;in `each'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/events.rb;78;in `trigger_event'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;357;in `event_control_callback'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;311;in `callback_handler'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;269;in `block in add_callback'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;203;in `call'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;203;in `show_modal'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/SKUI/window.rb;203;in `show'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;145;in `main'
      C;/Users/Keith/AppData/Roaming/SketchUp/SketchUp 2014/SketchUp/Plugins/jf_add_layer/main.rb;185;in `block in <module;AddLayer>'
      -e;1;in `call'
      

      The other options worked as expected. Note: this also failed in 2013 with a slightly different error message.

      Keith

      posted in Plugins
      K
      ktkoh
    • RE: Page UpDate problems

      The view refresh worked. Thanks.

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • Page UpDate problems

      My script creates a new page and adds several views of a component then finishes with

      Sketchup.active_model.active_view.camera.perspective = false
              Sketchup.send_action "viewFront;"
              Sketchup.send_action "viewZoomExtents;"
              Sketchup.send_action "pageUpdate;"
      

      However it often does not update the page view. If I select the page then the view shows as expected so the actions were applied except for the final update of the view.

      I had seen a comment here about how to fix this and had copied the info but now that I want to use it it's not where I can find it. Any Suggestions??

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: Create Face to PushPull along a curve

      Here is an image of what I need. A face normal to the end of the curve on which I can draw a detail to pushpull along the curve.
      [img]FaceNormal2CurveEnd.jpg[/img]

      posted in SketchUp Discussions
      K
      ktkoh
    • Create Face to PushPull along a curve

      I have a project (furniture) that uses some curves and I need to pushpull along the curve and it took me a long time with many steps to draw a face Normal to a line extended from the curve. The curve is not a radius but curve drawn with belzerspline plugin.

      I thought at one time I had seen a plugin to create such a face but I could not find it when I needed it.

      Or is it simpler with the native tools if you follow a known procedure?

      Keith

      posted in SketchUp Discussions sketchup
      K
      ktkoh
    • RE: [Plugin] K2WS_Tools a joint tool set for SU

      I am using SU2013 and I downloaded the K2Tools file from the Ruby Depot and changed the .zip extension to .rbz and installed it as a extension from the preferences menu and the tools worked for me.

      As stated above file permissions are the first thing to check when a plugin fails to do anything.

      Keith

      posted in Plugins
      K
      ktkoh
    • RE: Print all or selected scene plugin?

      When You select print there is a section that allows you to select what scenes to print. However you can only do a range like 2 thu 6 etc.

      posted in SketchUp Discussions
      K
      ktkoh
    • Layer Name of Parent of Nested obj

      I am trying to retrieve the layer name of the parent of the selected nested obj using

      cur_layer_name = obj.parent.layer.name
      

      This code returns "Layer0" which is the active layer but not the (Visibility) layer returned when the enity info for the parent is checked "A02-Drawer_3x20"
      If I select the drawer and open it for editing then try to make layer "A02-Drawer_3x20" not visible I get the message that I cannot hide the layer the active component is on.

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: New mortise &amp; tenon tool for woodworkers

      Here is one of the files. Most features work similar

      Keith


      LooseTenonJoint.swf

      posted in Plugins
      K
      ktkoh
    • RE: Align component boundingbox to global axis

      I AM CANCELING MY REQUEST FOR THIS HELP:

      After looking at posts on this subject I realize that the bounding box and selection box are 2 separate things and I am going to abort the attempt to rotate the component and align it with the global axis before making the drawing views. For most ww projects there are few parts for which the user will need to correct the drawing views and the plugin already has a feature that makes this easy so I am going to stick with that solution.

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • Align component boundingbox to global axis

      I am rewriting my plugin [Comp2LayerSenes] that creates scenes for parts for making dimensioned drawings. It currently calls the makeorthoviews but I am writing my own drawing views section. A problem that is not currently addressed is how to display parts drawn at an angle to the global axis ( for example a corner brace ) Currently the part is copied to a new layer in its original orientation and then the other views are created by rotating copies of the part. See attached drawing [problem scene]. Currently the user would see it was not correct and delete all but 1 view, rotate that view to align with the global axis, then recreate the views with one of the plugin's features. See attached drawing [corrected scene].

      What I would like the program to do would be inspect the boundingbox corners and if they are not aligned with the global axis to transform the part into the aligned position before creating the additional views.

      Having read what I could find here with the search function I have not found much help.

      Any suggestions?

      Keith


      Test Angle Comp2SceneExample.skp

      posted in Developers' Forum
      K
      ktkoh
    • RE: Cleanup Old Plugin Versions?

      I worked with the code yesterday and this am. I found it worked well if the file was in the plugin directory. However I had no success when I tried to run the file from the directory Plugins/k2ws_Comp2LayerScene directory. I tried changing the line replacing the FILE with a filename that was in the Plugins

      self.delete_folder(File.join(File.dirname(__FILE__), 'K2WS'))
      
      self.delete_folder(File.join(File.dirname("k2ws_Comp2LayerScene.rb"), 'K2WS'))
      

      but that made the folder ./K2WS and thus it was not found. I read some more on ruby but none of the things I tried fixed this.

      I looks like I would need to add the clean up code to the end of the file that creates the extension so it would start from the correct directory and I am not sure this is allowed in the warehouse.

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: Cleanup Old Plugin Versions?

      Thanks I will work on that this afternoon.

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: Cleanup Old Plugin Versions?

      I was looking at releasing a new version of my plugin comp2layerScene with new features and considering to make the dir and file names compatible with the SU Warehouse specifications. Thus I would need the new version to delete the old version.
      Could you show a sample code used to delete/clean up old files & dir? as I am not sure how to do this.

      Thanks Keith

      posted in Developers' Forum
      K
      ktkoh
    • RE: Component Axis Display Option

      Thanks that's what I needed. I am always amazed at how quick I get answers on this forum. I would never be able to find these on my own.

      Wouldn't it be nice if the examples in the Sketchup Documentation actually worked.

      Keith

      posted in Developers' Forum
      K
      ktkoh
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 12
    • 13
    • 5 / 13