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

    Topics

    • H

      Search a DC attribute string value

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      5
      0 Votes
      5 Posts
      8k Views
      H
      YES! I see now. That is some pretty sweet re-engineering of the pretty remedial string functions! I do wish FIND would just return FALSE if the string is not found but oh well. Thanks Again pcmoor!
    • H

      Importing Bulk Attribute Values from CSV

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      2k Views
      H
      BTW, the answer to the original question was that input = UI.inputbox(@prompts, @defaults, @list, "Select Attribute Target") returns an array of values because typically the inputbox would present more than 1 option. In my case there was only one input or prompt so when I put input into set_result = Sketchup.active_model.set_attribute("dynamic_attributes", input, att_string.to_s ) I was actually sending in an array and thus setting a new key in the format ["whatever user put into inputbox"]. Even .to_s did not seem to help... set_result = Sketchup.active_model.set_attribute("dynamic_attributes", input.to_s, att_string.to_s ) The answer was to get the first item in the array like so: set_result = Sketchup.active_model.set_attribute("dynamic_attributes", input[0], att_string.to_s )
    • H

      Ruby Group Copy - Regardless of Context?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      2k Views
      H
      Thank you Dan!
    • H

      Ruby Observer Existence Check

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      2k Views
      Dan RathbunD
      @tig said: You can set @obs = ... within a module, outside of any of its methods and that then persists thereafter. This is true because, a module is an instance of class Module. @hank said: Have not gotten very advanced with Classes etc. so just a simple module. The Class class is the direct child class of class Module. So classes inherit all of Module's functionality, and get a little bit of their own (ie, a few extra methods and the ability to have many instance copies of themselves, that can hold their own instance variable values.)
    • H

      Ruby Sketchup Programmatic Union of Multiple items

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      2k Views
      Dan RathbunD
      @Sklik-Rab said in Ruby Sketchup Programmatic Union of Multiple items: @Dan-Rathbun How to check if @union become nil? To check if the reference points at nil, you can use: @union.nil? which is inherited by Array from Object#nil? To check if the array is empty, you can use: @union.empty?
    • H

      Erratic Duplication of Dynamic Components?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      932 Views
      H
      Thanks @pcmoor I see what you are saying... The WALL DC has only dumb objects in it with no parameters. The OPENING DC has sub objects that use parameters. But this seems insane! You mean, the second you take advantage of parameters for your sub-objects you loose the ability to have central command of your DCs?!!! Perhaps you can explain your modeling techniques more? So you have a DC you copy around a bunch of times the explode it? Doesn't that kill any link you have to the original definition?
    • H

      Copy a Group within a Component in Ruby, preserve location

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      2k Views
      Dan RathbunD
      @hank said: **@Dan Rathbun:**I am just using the layer as an easy selector for the groups I want within the component. This is fine. Ie, using the layer property as a filter. @hank said: Do you recommend another way? I recommend rereading what I wrote. It was just general information (triggered by incorrect terminology you chose to use in an earlier post.)
    • H

      How to use FIND() in an IF() statement

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      6
      0 Votes
      6 Posts
      7k Views
      H
      Thank You Jim! So how about if I wanted to find out if the string "SINGLE" exists anywhere in the string?
    • H

      Dynamic Component IF statement text comparison

      Watching Ignoring Scheduled Pinned Locked Moved Dynamic Components sketchup
      4
      0 Votes
      4 Posts
      5k Views
      H
      OK, I think I figured out what was causing the problem. When you type double quotes into the dynamic component (at least in Sketchup for Mac) the double quotes are sometimes changed from " to “ causing the formula to throw an error. Thanks nonetheless for your help Jim!
    • 1 / 1