sketchucation logo sketchucation
    • Login
    1. Home
    2. fizgig
    3. Posts
    ℹ️ 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

    Posts

    Recent Best Controversial
    • 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
    • RE: Sketchup registry key ?

      Not sure why my first pass at searching here came up dry. Must have misspelled something. Anyhow, this post seems very interesting: http://forums.sketchucation.com/viewtopic.php?f=180&t=11338&p=78374&hilit=+installer#p78374

      posted in Developers' Forum
      F
      fizgig
    • RE: Sketchup registry key ?

      Does anyone have any tips for making a ruby script installer for windows? I need to be able to copy a directory to the c:\ and then copy a loader script into the plugins folder.

      posted in Developers' Forum
      F
      fizgig
    • RE: Wacky dynamic component doors

      Not sure if that is true as Sketchup doesn't put the quotes in there when I click on it. Perhaps it is, don't know yet since I can't pass step one which is to be able to find and manipulate the right Rot variable without it going strange on me.

      posted in Dynamic Components
      F
      fizgig
    • RE: Wacky dynamic component doors

      Thanks for the video link. Seems to contain the same ideas as the sketchup dynamic component example though.

      I've attached my door. If you try to change any of the Rot values for the door itself, it goes haywire.


      dumb door.skp

      posted in Dynamic Components
      F
      fizgig
    • Wacky dynamic component doors

      I'm trying to make a door open and shut. I follow the example but when I apply the final rule to the RotZ value of the door and hit enter, the door rotates around another axis.

      This happens whether I pick RotX, RotY or RotZ.

      When I pick one of them, it has a default value already in it. Say the default value is -180, if I try manually changing it to -175, it still flips out crazily instead of changing slightly.

      Anyone else see this behavior?

      posted in Dynamic Components sketchup
      F
      fizgig
    • RE: Anyone know how to change the color of a layer?

      So it would be something like the following?

      fletch.call_in_middle_of_the_night.get_in_car.come_to_current_location.manually_change_color "Black"

      posted in Developers' Forum
      F
      fizgig
    • Anyone know how to change the color of a layer?

      I don't see any method to do so.

      posted in Developers' Forum
      F
      fizgig
    • RE: Scrambler.exe

      I just realized that it is loading as I can click on the blank spot where the icon should be and the program runs. I just need to get the graphic into that button.

      posted in Developers' Forum
      F
      fizgig
    • RE: Scrambler.exe

      I'm using scrambler.exe for the first time. I get an .rbs file out of it. I then try to load the file using a loader script in the plugins folder:

      Sketchup.load('path to file/file')

      It doesn't seem to load because when it loads unscrambled, I can see the new buttons that the script creates. When I load the encrypted file, I don't see them so I guess it isn't loading.

      I then add a line to the loader to show the ruby window before trying to load my scrambled script and the window shows up but no Ruby errors are shown in it.

      I don't see a heck of a lot of documentation on this, does anyone know what I'm doing wrong?

      posted in Developers' Forum
      F
      fizgig
    • RE: Getting the material of a face not directly assigned...

      😄

      You guys are illustrating why I was looking for a shortcut. The face in question that I want to see the material of can possibly be inside a group inside a component instance inside a group and so forth. This makes it challenging to do what I want to do.

      Not a big deal for me, I can solve my particular problem by going another route that doesn't require my knowing the inherited face material. It wont be as elegant but it will solve the problem I'm working on.

      posted in Developers' Forum
      F
      fizgig
    • 1 / 1