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

    Posts

    Recent Best Controversial
    • RE: Where is the SketchUp API site?

      Probably this page is closer what you have in mind.

      http://developer.sketchup.com

      http://developer.sketchup.com/en/content/welcome

      posted in Developers' Forum
      J
      Jim
    • RE: Scale to exact dimension ?

      Scale the objects to some arbitrary size, and then enter the exact lengths after. You can now enter " marks without the Scale Tool switching modes.

      Are you saying the Mac Scale Tool changes modes after completing the operation?

      posted in Newbie Forum
      J
      Jim
    • RE: Solid tools on components

      @newnoob said:

      I suppose you are the Jim who wrote "Trim and Keep", many thanks for that!

      Aye. You're welcome. Thank Dave - he's the one who conceived it - I just wrote it.

      posted in Newbie Forum
      J
      Jim
    • RE: Solid tools on components

      @dave r said:

      Meep
      Made me choke on my coffee. 😄

      You started it...

      posted in Newbie Forum
      J
      Jim
    • RE: Solid tools on components

      @newnoob said:

      Thanks Dave, Trim and Keepp is working flawless. I was succesfull in trimming all the strut instances against all the hub instances of my geodesic dome model.

      I am glad you were successful too. FYI Trim and Meep purposefully does not remove the components left around after performing the operation. They are all still available in the Component Browser. Run a Purge Unused operation to clean them up.

      posted in Newbie Forum
      J
      Jim
    • RE: [Plugin] GreyscaleMode

      Hinujak,

      GreyScale is compatible with 2017 - it is available in the SketchUcation Store. Please let me know if you have any trouble downloading or using.

      http://sketchucation.com/pluginstore?pln=greyscale

      posted in Plugins
      J
      Jim
    • RE: MeshLab 2016

      Good news! I thought Meshlab was going to stagnate.

      posted in Freeware
      J
      Jim
    • RE: Save and recall parameters of an object created with ruby

      Use an AttributeDictionary attached to the wall Component.

      You can attach the dictionary to either the ComponentInstance or the ComponentDefinition (or both) depending on your needs. AttributeDictionaries can be attached to any SketchUp Entity or the Model for that matter. AttributeDictionaries are saved with the model on disc.

      You use them similar to a Ruby Hash object, but they store the key/values to a SketchUp Entity. Use the #set_attribute and #get_attribute methods of Entity objects.

      http://ruby.sketchup.com/Sketchup/AttributeDictionary.html

      posted in Developers' Forum
      J
      Jim
    • RE: ARK II Vehicle

      Nice render. It reminded me of this thing:

      Link Preview Image
      The Antarctic Snow Cruiser

      favicon

      (web.archive.org)

      posted in Gallery
      J
      Jim
    • RE: Any way to install two copies of SU (same version)?

      I believe a way to save the toolbar positions and restore them would be ideal, not only for my current situation, but also for Backup/Restore.

      It may be possible to backup and restore the registry for various configurations in your batch file.

      Export:

      
      reg export "HKCU\Software\Sketchup\SketchUp 2017" Sketchup_2017.reg
      

      Import:

      
      reg import Sketchup_2017.reg
      
      
      posted in Developers' Forum
      J
      Jim
    • RE: Any way to install two copies of SU (same version)?

      There are also 2 settings available through the Sketchup module that may be of interest.

      They are plugins_disabled and debug_mode.

      Link Preview Image
      Module: Sketchup

      The Sketchup module contains a number of important utility methods for use in your Ruby scripts.

      favicon

      SketchUp Ruby API Documentation (ruby.sketchup.com)

      posted in Developers' Forum
      J
      Jim
    • RE: Any way to install two copies of SU (same version)?

      I don't care for the idea of renaming the folder although it's probably fine.

      First just set an environmental variable from the batch file, and use it in a Ruby script to select a plugins sub-folder to load from.

      Second, SketchUp accepts a command line argument which is a Ruby script to run. It can be located anywhere. Search this forum for RubyStartup.

      I have a GutHub repo with and example of portable plugins loading. https://github.com/jimfoltz/SketchUp-Portable-Plugins-Loader

      posted in Developers' Forum
      J
      Jim
    • RE: View.write_image shows dotted line border

      @rami_lpm said:

      the color can be adjusted? is there a command to do that? I can try and see.

      I think it is one of the RenderingOptions.

      posted in Developers' Forum
      J
      Jim
    • RE: Changing the component name in Components Directory.

      It would not be hard to script, it's "only" a matter if finding someone with time. I can look into it later this week if no one else comes along.

      posted in Newbie Forum
      J
      Jim
    • RE: How do I correctly set the Length formulas in a DC via Ruby

      It looks like you need to do this:

      
      comp1_def.definition.set_attribute(@component_dictionary, '_lenx_formula', (laenge.to_f*2.54).to_s)
      
      

      But you will need select the conversion factor based on the DC Dialog units. It will either br cm or inches.

      posted in Developers' Forum
      J
      Jim
    • RE: How do I correctly set the Length formulas in a DC via Ruby

      What is the value you are using to set the attribute? Print it out to the Ruby Console using the p command.

      From the image,it could be incorrect decimal separator.

      Or you are including the "=" in the formula.

      Or try not incuding the units in the forumula.

      There are "=" sign in the taxt box but the "Toggle Formula View" is not pressed. The "=" should not be there.

      posted in Developers' Forum
      J
      Jim
    • RE: How do I correctly set the Length formulas in a DC via Ruby

      Try this code.


      jh_dc_testcode.rb

      posted in Developers' Forum
      J
      Jim
    • RE: How do I correctly set the Length formulas in a DC via Ruby

      Not this:

      
       comp1_def.definition.set_attribute @Component_dictionary,'lenx', '_lenx_formula'
      
      

      Correct:

      
       comp1_def.definition.set_attribute(@Component_dictionary, '_leny_formula', '2*LenX')
      
      
      

      Please provide minimal but complete and executable code when asking for help. This means properly indented, properly namespaced, with a menu item, and no Syntax Errors. You will get better help. Also, either attach the .rb file or wrap the posted code in

      
      [code][/code]
      
      

      tags.

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic components for folding table base

      I had the right idea using the sin function but I had to shift the movement 90 degrees out of phase. This one should work and look more natural, even if it is not perfect.


      folding table base draft-jf2.skp

      posted in Developers' Forum
      J
      Jim
    • RE: Dynamic components for folding table base

      I also tried to fix the animation so the parts don't go through one another. I thought using the sin function would do it but I must not have had the formula just right. I do think it can be done I just ran out of time.

      posted in Developers' Forum
      J
      Jim
    • 1 / 1