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

    Topics

    • L

      Deleting group.copy?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      212 Views
      L
      Yeah, that worked, and not having to explode my group fixed a lot of problems. Thank you!
    • L

      Weirdest loading bug ever?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      16
      0 Votes
      16 Posts
      680 Views
      Dan RathbunD
      @lothcat said: Thank you so much! It's working now and I'm not having that weird loading bug! Excellent! @lothcat said: Also, thank you for being patient with me. This was a real learning experience. I would be very worried if you had not learned anything, here ....
    • L

      Checking for a group?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      15
      0 Votes
      15 Posts
      868 Views
      Dan RathbunD
      @artmusicstudio said: MODULE 01.rb // is it right to put hier 01.rb ??? (the work-name of the ruby) No you cannot use a Numeric expression as a Class or Module name. They must begin with alpha characters, and be title case.
    • L

      How to find a group?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      136 Views
      TIGT
      Because it's working on a user's selection then all of the selected entities are in the active_entities context and you won't run the risk of a BugSplat by making a group from them directly [this is advised against usually but try it]. model=Sketchup.active_model ents=model.active_entities ss=model.selection group=ents.add_group(ss.to_a) volume=group.volume group.explode 'volume' is the volume of the selected objects in cu" if the objects don't form a solid then it'll be a negative value... Assuming that the user should have selected one group to get the volume... if ss[0] and ss[0].class==Sketchup;;Group volume=ss[0].volume if volume==0 UI.messagebox("Warning! The selected group has no volume") elsif volume<0 UI.messagebox("Warning! The select is not a 'solid' group.") end#if else UI.messagebox("Select ONE group!") return nil end#if there are many ways to achieve what you want
    • L

      Trying to retrieve face using ComponentInstance.glued_to

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      190 Views
      Dan RathbunD
      @lothcat said: @dan rathbun said: FYI: There is a missing ) in line 5 of the snippet. D'oh! Thank you! I was so sure I was using this wrong that I didn't even look for actual coding errors. Usually the Ruby error tells you what line of the code that the error is in, and echos that erroneous line. Also it may print an extra line beneath the erroneous line with a caret symbol pointing at where it thinks the error is. Not always helpful, as it may just point at the end of the code line if the parser doesn't really know, for instance, where the missing ")" symbol should go. And.. a syntax error IS a coding error, most often missing delimiters, brackets, etc.
    • L

      Adding attributes help

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      29
      0 Votes
      29 Posts
      2k Views
      tt_suT
      Yea, like you wouldn't feed raw user data to your database, you don't want to feed user data to eval. (I consider anything read in from the system or file to be "user data"). Validate and sanitize - this is the stuff you want to find a library that has solved all the edge cases for you.
    • 1 / 1