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

    fizgig

    @fizgig

    10
    Reputation
    1
    Profile views
    69
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    fizgig Unfollow Follow
    registered-users

    Latest posts made by fizgig

    • RE: Animate doesn't return to normal

      @saladyne said:

      No-one else stepped in so I've done a bit more research and there is a problem with the coding in fizgig's DC. To quote the 'Assembling a Dynamic Component' example from this site; "When you want to reference an attribute value quotation marks are not needed. If you are telling an attribute to do something they are needed". The quotes are noticeably missing around 'swing_angle' in fizgig's component... adding them in fixes the problem of creating a rogue attribute. It doesn't however fix the referencing issues, but these can be corrected by moving the 'onClick ANIMATE' command to the BODY part of the component.

      Sorry Saladyne, I didn't see your post there. Funny enough, I ran into the problem again and knew I had discussed it before. I just came back and searched for my posts and found this thread and your last post about the need for quotes. That did the trick. Thanks so much!

      posted in Dynamic Components
      F
      fizgig
    • RE: Anyone know why changing "RotZ" to 45...

      That makes sense. I've edited the body to not have the -180 degree problem and when I now click on it, it swings the way I want it to. I'd like it to return to home position if you click on it again. For some reason, it blows up on the second click. No idea why.


      test2.skp

      posted in Dynamic Components
      F
      fizgig
    • Anyone know why changing "RotZ" to 45...

      flips the guy upside down?


      test.skp

      posted in Dynamic Components sketchup
      F
      fizgig
    • Animate doesn't return to normal

      I have a component that has an onclick function that looks like this : "animate(swing_angle,0,-90)"

      This changes the custom variable called "swing_angle" which is located right next to the above rule in the same component.

      a sub-component has a rule that its RotX is "=Main Component!swing_angle"

      Anyhow, if I click on the whole thing, the sub-component swings down like I want. When I click it again, I expect it to go back to where it was (0 degrees). Instead, it doesn't animate back, but makes a new custom variable called "-90" with a value of "0".

      Anyone know why a new custom variable is created instead of just changing swing_angle back to 0?

      posted in Dynamic Components sketchup
      F
      fizgig
    • Sketchup makes backup files and leaves original alone

      Often times I'll be working with a model for a few hours and I'll close it only to later find a bunch of backup files in the same directory (0.skb, 1.skb, etc...) with the original file left unchanged.

      Why does it do this?

      posted in Newbie Forum sketchup
      F
      fizgig
    • Delete a material that's being used (using Ruby)

      Any way to do this?

      posted in Developers' Forum
      F
      fizgig
    • Random Name Chooser

      I was at a tradeshow a couple of days ago where we used a scanner to scan people's names in for a drawing later that day. It had an SD card in it and I wondered if the file would be a simple text file with csv delimitting and it turned out it was. I then wondered if I could use sketchup to program a random name drawing system based off that text file. A few minutes of programming later, there it was.

      It flashes name after naming while slowing down just like a spinning wheel using exponentially growing delays and beeps to build the suspense.

      I couldn't find a command to select all and delete all so I have lame loop that keeps deleting top level entities until there aren't any so the next name can be displayed:

      Sketchup.active_model.entities.each {|yo| yo.erase!} while Sketchup.active_model.entities.length != 0
      

      Anyhow, it's attached if anyone can use it. I'm sure it can be optimized quite a bit. Wonder if sketchup's ever been used like this before...


      random.rb

      posted in Developers' Forum
      F
      fizgig
    • RE: What button is the user holding down?

      Yeah. Looking into it, there is a lot more work involved. I'd have to change my program quite a bit to fit it into this programming structure.

      posted in Developers' Forum
      F
      fizgig
    • RE: What button is the user holding down?

      Aha! The tool class!

      Thanks for the info. I skipped over that in the api doc as it didn't sound like a match.

      posted in Developers' Forum
      F
      fizgig
    • What button is the user holding down?

      Anyone know how to sense that? I'd like to read the keys so when the user presses a button linked to a script of mine with their mouse, something happens according to what letter they're pressing down on the keyboard when the button is pressed.

      posted in Developers' Forum
      F
      fizgig