sketchucation logo sketchucation
    • Login
    1. Home
    2. jblively
    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 17
    • Posts 41
    • Groups 1

    Posts

    Recent Best Controversial
    • Send Action to show layers window HELP!

      Hello,

      Making a custom toolbar with Ruby and everything works great: Icons, actions, everything....except:

      I can't get the command to show the Layers Window to work.

      I've tried both of these:

      result = Sketchup.send_action "WindowLayers:"

      result = Sketchup.send_action "21354:"

      Referenced from here:
      http://code.google.com/apis/sketchup/docs/ourdoc/sketchup.html#send_action

      On a PC WinXP, SU 8

      Nothing occurs when I click the button. But I can put any other action in there and it works fine.

      Anyone have any ideas?

      Thanks.

      Joe

      posted in Extensions & Applications Discussions extensions
      J
      jblively
    • RE: SketchyPhysics 3.2 Need bug reports!

      @cphillips said:

      If you send me the file and the extra ruby code I can try it out in a debugger and see if I can figure it out.

      Chris,

      I created a downloadable file for you and sent the details to you via PM. Thanks again!

      Joe

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics3.2 (Dec 2)

      @robint said:

      to make magnetic solids work you need to set the ui box status to magnetic
      and the magnetic force to a large value eg +- 1000

      I do believe that magnetic force is also affected by mass and scale. So if the model is very large, you'll need a larger value for magnetic force. If you have a small scale model, you can use a magnetic force of as little as 10 to see results.

      There is so much involved in SP, more documentation would be nice, but i'm just glad we have people here we can chat with who want to help!

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics 3.2 Need bug reports!

      Using SU 8, SP 3.2

      I'm still experiencing sporadic crashes of SU when running SP3.2. Not sure what's causing it. Below could be the issue, but want to see what you think.

      We have a routine that is ontick, that calls a Ruby subroutine that is defined in a custom RB file that is loaded at start up. The subroutine opens an ascii text file and reads the values. Since it's ontick that this routine is called, this file operation happens alot.

      Sometimes for no reason, SU just throws up a Microsoft C++ error and crashes. Sometimes it's a few frames in, sometimes it's 100's of frames in, sometimes it doesn't crash at at. But it occurs while the model is just sitting there, ticking away.

      This didn't seem to occur on SU7 with last year's sketch up. But, we weren't looking for it till now. We had some crashes, but just attributed it to normal bug splats. However, now they are too frequent to ignore.

      Any thoughts or suggestions on how we might debug it or what really might be causing it? Would there be a better way to have the subroutine check the values of a ascii file without doing it ontick?

      Thanks.

      Joe

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics3.2 (Dec 2)
      • New script command setFrameRate overrides physics settings framerate.

      Hello, trying to implement the set frame rate command to get the model to slow down on faster computers so we can anticipate the results.

      Can you let me know the usage and where to put it.

      I've tried setFrameRate=5; in the on tick section and it doesn't seem to make any difference.

      Thanks,

      Joe

      posted in SketchyPhysics
      J
      jblively
    • Finding Code

      Hello,

      Is there any tricks or something I don't know about that would make it easier to find where I have code stored in a model. I've got a few complex models with lots of code, and I can't find all of the objects that i've placed scripted code in.

      Is there a way to track or locate objects that have code attached to them?

      Joe

      posted in SketchyPhysics
      J
      jblively
    • Open layers from Custom Toolbar

      Hello,

      I can do most items from within my custom tool bar, using this code here:
      result = Sketchup.send_action โ€œactionโ€

      and parameters like these:
      showRubyPanel:
      viewZoomExtents:
      viewZoomToSelection:
      viewUndo:
      selectOrbitTool:
      selectDollyTool:
      selectTurnTool:
      selectWalkTool:

      But I don't know what the code is to turn on the layers window. I've try a few guesses and nothing seems to work. Any tips?

      Thanks,

      Joe

      posted in Developers' Forum
      J
      jblively
    • Application Observer

      Hello,

      I've been trying to find it, and I can't seem to, so I thought i'd ask here. I want to have an event occur when the sketchup application is opened...namely, I'd like to open a web dialog box, when sketchup is launched.

      I was trying to use a open observer and just launch sketchup with a file, but apparently, a commandstring open doesn't trigger the open observer. (Of course, it works perfect if I go to file open and open a file)

      Any tips on how to get a web dialog box to appear when sketchup is opened?

      thanks,

      Joe

      posted in Developers' Forum
      J
      jblively
    • RE: SketchyPhysics3.1

      @cphillips said:

      Ah, i forgot about the motor joint. Ill fix in next version.

      Thanks! Thought I was going a little crazy!

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics3.1

      @cphillips said:

      I have enabled the autoupdate. Hopefully it works.

      Auto update works like a charm.

      I have having a bit of troubles with the auto connecting Joints and the Slider. I can get the slider to show up, but I can't get it to react to the slide when I move it. I'm using a motor joint, maybe that's the issue?

      I've attached a very simple sample, can you see what I might be doing wrong?

      Here is the joint code I am using:

      ontouch{|t,s,p|
      @jnt=connect(t,"motor",0,0,1,0.5)
      ontouch{}
      }
      ontick{
      if @jnt!=nil
      @jnt.controllerValue=slider("motor",0)
      end
      }

      Thanks,

      Joe


      gears2.skp

      posted in SketchyPhysics
      J
      jblively
    • RE: Sketchyphysics

      @magnetar said:

      It can..using it for Phoenix Flight Sim with a usb adaptor

      If it acts like a normal joystick and can be recognized by windows as a standard joystick, you should be able to get it to work.

      Take a look at this reference card and it will give you the controller commands for the axis you can use.

      Link Preview Image
      Deletion notice | Scribd

      favicon

      Scribd (www.scribd.com)

      Good Luck!

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics3.1

      @cphillips said:

      Updated the scripting reference. Not done yet, but more usable now.

      Link Preview Image
      Google Code Archive - Long-term storage for Google Code Project Hosting.

      favicon

      (code.google.com)

      WOW!

      I know how it's not fun to doc (i've done my share) but I know we all will really appreciate this new format. Very readable and usable! Great Job!

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics3.1

      @cphillips said:

      Ah! Turns out to be easier than I thought. This will work in next version:

      Excellent!!!!!

      Can't Wait ๐Ÿ˜„

      posted in SketchyPhysics
      J
      jblively
    • RE: SketchyPhysics3.1

      @cphillips said:

      Here are some older examples that now work in this official release version.

      http://forums.sketchucation.com/viewtopic.php?f=61&t=20209&start=0#p168251
      http://forums.sketchucation.com/viewtopic.php?f=61&t=20209&start=0#p168253
      http://forums.sketchucation.com/viewtopic.php?f=61&t=20209&start=0#p168254
      http://forums.sketchucation.com/viewtopic.php?f=61&t=20209&start=0#p168265

      On the self Connecting Joints Example, can you add a name of a slider in there, so there can be a way to control the joints via the control panel?

      ontouch{|t,s,p|
      connect(t,"servo")
      ontouch{}
      }

      I didn't see it in this Definition: connect(child,type="ball",min=0,max=0,accel=0,damp=0,breakingForce=0)

      I'll never draw another dang joint again if this works ๐Ÿ˜‰

      posted in SketchyPhysics
      J
      jblively
    • RE: Sketchy Physics Code Sections not showing

      @camokid11 said:

      also, try make a box first and try the UI on that first. it might work.

      try that before reinstalling anything, or trying my previous advice.

      A small test

      a small test to see if ontick does work, just put this script into the ontick field

      if key('space')==1;UI.messagebox("This script works!");end
      

      start the simulation and press space and a message should come up.

      Found out what it was. It was teh EXE install of sketchyPhysics I was having troubles with. I did the zip file and it worked perfectly. Sorry for the late update, but if anyone else has the issue, I wanted to make sure they find a resolution.

      Oh, and YES, the code you posted above does work. So, it's not that the code wasn't running, I just couldn't get access to it with the EXE install I was used via the UI panel. Weird, but it's working, and that's all I need ๐Ÿ˜‰
      Joe

      posted in SketchyPhysics
      J
      jblively
    • RE: Windows 7, Sketchup 8 and SP 3 issues

      @cphillips said:

      I have found and fixed at least one problem with SP and SU8. Turns out the bug would also crash SU7 but far less frequently. The problem was with hinges and servos that used both min/max and accel/damp without a controller field.

      The downside to this fix is it may break older models that worked fine in SU7 but now crash SU8. I guess that is just the trade off. I'll do a bit more testing and then post a version and we will see if that fixes the instability.

      This would most likely be the cause of our issues. As that is the scenario that the models that are crashing all have in common!

      Wow, great job in determining that. Because, YES, sketchup 7 did crash sometimes...but we just attributed it to common bug splats because it didn't happen often or consistently.

      Thanks again!!

      posted in SketchyPhysics
      J
      jblively
    • RE: Windows 7, Sketchup 8 and SP 3 issues

      @cphillips said:

      Can anyone who has SU8 and Win7 confirm whether it does or does not work?

      It's very random. On a given full day of working, sketchy physics will crash sketchup 7-8 times. Always while in run mode, and never at the 'start' of the simulation, usually a couple minutes in.

      I don't have visual studio, sorry.

      Using Win 7, Sketchup 8 and SP3.

      posted in SketchyPhysics
      J
      jblively
    • Windows 7, Sketchup 8 and SP 3 issues

      Hello,

      I was wondering if anyone else is having the same issues as I am. Just recently got a new machine with Windows 7 Home and installed Sketchup 8 and Sketchyphysics 3.

      I seem to be getting a lot of bug splats now when I run my old simulations developed on my WinXp box in Sketchup 7. I didn't have these issues on XP with Sketchup 7. It's almost every time I run the simulation. It happens not right away, but about 1 or 2 minutes in.

      Anyone else experiencing issues with this configuration?

      Thanks,

      Joe

      posted in SketchyPhysics
      J
      jblively
    • Sketchy Physics Code Sections not showing

      Hello,

      I installed sketchup 8 (i've been using sketchy physics fine with sketchup 7) and then installed sketchyphysics via the exe install. I made sure it installed into the correct sketchup8 directory but now the ontick and ontouch boxes in the UI don't appear.

      I've tried reinstalling? Any tips?

      Joe

      posted in SketchyPhysics
      J
      jblively
    • Help with code

      Hello,

      I'm still trying to learn how to work in sketchy physics, and am missing some of the basic issues I guess.

      In Sketchup, I can get the bounding box of an item very easy:
      All I have to do is click on it and then run the following code:

      group = Sketchup.active_model.selection[0]
      bb = group.bounds
      bb.corner(0)

      However, in Sketchyphysics, I can't click on any item in 'runtime' Does anyone know how i'd get the bb.corner(0) of an object in runtime in sketchy physics?

      I was doing some researching, and it looks like someone was using code like:

      $curEvalGroup.transformation.origin[0]

      To get the origin point of an object. But I don't understand how the $curEvalGroup was assigned! I looked all over the model and I couldn't find where it was set or even if it has anything to do with what i'm trying to accomplish.

      The main goal here is to be able to figure out how to determine a groups position on the fly in sketchyphysics/ruby.

      Thanks so much.

      Joe

      posted in SketchyPhysics
      J
      jblively
    • 1 / 1