sketchucation logo sketchucation
    • Login
    1. Home
    2. Chiefwoodworker
    3. Posts
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 26
    • Posts 151
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: CutList Bridge 2.0 Now Available

      @pbacot said:

      Glenn,

      The black background in webdialogs has been happening in Macs from a Safari upgrade. See this thread:

      http://forums.sketchucation.com/viewtopic.php?f=11&t=45382&start=15&hilit=FIELDS+BLACK+ON+A+MAC

      Hi Guys,

      I am working on a fix for this problem for the CutList Bridge plugin. I hope to have it out today some time. Thanks.

      posted in Woodworking
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: CutList Bridge 2.0 Now Available

      @chiefwoodworker said:

      Hi Folks,

      I don't think I ever posted this here, but I recently released CutList Bridge 2.0, a free cut list export tool for SketchUp.

      Version 2.1 of CutList Bridge is now available. Go to http://www.srww.com/blog/?p=1918 to download it.

      posted in Woodworking
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: CutList Bridge 2.0 Now Available

      @wilsonbuilt78 said:

      Hail Chief

      Havent sunk my claws into this thing just yet but I can already see massive potentiol in terms of timesaving, accuracy, and enhanced sharing of info. One of my biggest problems with my old workflow was maintaining revisions across the network (i employ a druaghtsman and another designer) locking the pertinent information to a single source ie. the model means the mishaps I have had in the past where design revisions werent updated in the cut list plus file resulted in huge costly mistakes in procurement.

      Hi Stephen,

      Do you use CutList Plus fx in your business? If so, the next version of CutList Bridge will be an even bigger plus in terms of locking the information into the .skp file and SketchUp itself. Stay tuned. And thanks for the feedback.

      posted in Woodworking
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: Sharing variables between functions

      Hi Derek,

      Make variable a a class instance variable e.g.@a.

      def self.Box()
      @a = 5
      b = 6
      c = @a * b
      end #Box

      def self.Circle()
      d = 12
      e = d * @a

      end #module

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • CutList Bridge 2.0 Now Available

      Hi Folks,

      I don't think I ever posted this here, but I recently released CutList Bridge 2.0, a free cut list export tool for SketchUp. CutList Bridge exports to CutList Plus fx, Microsoft Excel and OpenOffice. This version has significant improvements for exporting to MS Excel and OpenOffice. You can now choose the columns you want to export and the order in which they will appear. You can also choose three new columns: Dec T, Dec W and Dec L. These columns hold the decimal equivalent of the Thick(ness), Width and Length columns so that you do not have to convert Imperial dimensions to decimal numbers in Excel or OpenOffice. This make it easy for the user to add equations in Excel and OpenOffice to calculate rough lumber board feet, sheet good area and dimensioned lumber linear feet.

      You can view the User's Guide here http://www.srww.com/downloads/CutList%20Bridge/CutList%20Bridge%20User%27s%20Guide.pdf or go to my blog post to download the plugin http://www.srww.com/blog/?p=1918.

      If you are an OpenOffice user read post http://www.srww.com/blog/?p=1944.

      Lastly, the plugin zip file can be downloaded at http://www.srww.com/downloads/CutList%20Bridge/cutlist_bridge_revision_2.0.zip.

      posted in Woodworking
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: JetBrain/RubyMine Support for SketchUp Ruby Class, Method an

      If you ever want to try it you can get a 30 day free trial at http://www.jetbrains.com/ruby/download/ .
      I like it a lot, but I haven't used a wide variety of IDE's and am not an expert. But I do like it better than NewBeans, Notepad++, RJ TextEdit and one or two others I have tried and can't remember the names of.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: JetBrain/RubyMine Support for SketchUp Ruby Class, Method an

      @dan rathbun said:

      However.. do a search on this forum... there may be a rudimentary stub file. I think it may have been John (Driven,) that got RubyMine to grant the licenses, and was the instigator of the "study" at that time.

      Dan,

      I did a search and found no stubs, but I sent John a PM and asked if anything came of his effort. Thanks very much for all the explanation and pointers. I'll let you know if I discover anything new.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: JetBrain/RubyMine Support for SketchUp Ruby Class, Method an

      @dan rathbun said:

      They really can't. The Sketchup Ruby API is not open source, and it's wrapped within the Sketchup executable.

      Perhaps IF Rubymine could be run as a child process of SketchUp Ruby ?? (Just a thought.)

      Yes, but couldn't SketchUp make their gems files available for RubyMine to generate stubs?

      Joe...

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • JetBrain/RubyMine Support for SketchUp Ruby Class, Method an

      I use the JetBrain/RubyMine IDE for plugin development. It is a great IDE which focuses on Ruby/Rails/HTML/XML/CSS and JavaScript (and supports other languages too). I have been trying to get JetBrains to support SketchUp Ruby extensions. If you are a user of RubyMine, or would like to see an IDE support SketchUp extensions, please go to the link below and add a comment in support of this request.

      favicon

      (youtrack.jetbrains.com)

      Thanks,

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: OnActiveModelObserver

      @jim said:

      Good idea for a plugin.

      Is this a Tool class, or are you using a SelectionObserver?

      Sort of and Yes. It is not a drawing tool, but the tool adds attributes to a component(s) using dictionaries. I use selection observers to let the tool know when a selection has changed (by the way, selection observers don't play well with the Outliner and I have already filed a bug report on that).

      @jim said:

      Either way, can't you just get the active model from the selected entity?
      https://developers.google.com/sketchup/docs/ourdoc/entity#model

      Or from the Selection itself?
      https://developers.google.com/sketchup/docs/ourdoc/selection#model

      Hmmmmm! Now you have me thinking. The only problem I can see with that approach is that the Extended Entity Info box would get updated when a new selection is made after a new model became active. The time between a new active model and a new selection could be relatively long and during that period the incorrect, and potentially misleading data, would remain in the Extended Entity Info dialog box. That may not be a huge problem though.

      I have to give that approach some more thought. My timer work around is working well at the moment and I am inclined to leave it alone (though I do prefer real observers versus periodic sampling observers).

      By the way, this tool is described in it's User's Manual at http://www.srww.com/downloads/CutList%20Bridge/CutList%20Bridge%20User%27s%20Guide.pdf if you are interested. I also wrote about it in my June newsletter at http://www.srww.com/blog/wp-content/uploads/Chiefwoodworker%27s%20Newsletter/Chiefwoodworker%27s%20Newsletter%206-11-2012.pdf.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: OnActiveModelObserver

      @jim said:

      Hi Joe,

      If this is only for WebDialogs, it may work to update the variables when the dialog receives focus, i.e use the window.onfocus event to trigger a callback that updates the model and variables.

      Alternatively, if you are using a generalized method to perform the callback to the Ruby plugin, then your callback dispatcher could do the update before calling the callback method.

      Hi Jim,

      Unfortunately window.onfocus trigger doesn't work in this application. My WebDialog is sort of an extended Entity Info dialog box (it is actually called Extended Entity Info). The user can inspect components by just clicking on them one after the other. As he/she does this the Extended Entity Info dialog box needs to update with the new Sketchup.active_model.selection. So in this situation it never receives focus, but is expected to update anyway.

      In addition, when the active model is changed, e.g. by switching between multiple open models on a Mac or opening a new model on the PC, the same WebDialog needs to update with the new Sketchup.active_model.selection on the new active model without ever receiving focus.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: OnActiveModelObserver

      I came up with a work around using the timer to monitor changes in Sketchup.active_model. A kind of home brew observer. When a change in Sketchup.active_model is noticed I update necessary variables with Sketchup.active_model.selection and other state. This allows me to use the same WebDialog independent of the SketchUp model currently active. Works great on both the Mac and PC. Thanks for the help.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: OnActiveModelObserver

      One wonders if, and hopes, these things will get resolved more quickly under the Trimble umbrella. I am trying to come up with a work around and have fallen into similar problems to those you describe Dan. Thanks for the summary.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: OnActiveModelObserver

      Thanks thomthom and Dan. I was afraid of that. Oh well, I am sure I can find a work around.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • Using Unit Test with SketchUp for Debugging & Testing

      A friend of mine, Steve Baumgartner, showed me how to hook up Unit Testing to the SketchUp Ruby API and Ruby Console. See http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing for brief introduction and http://ruby-doc.org/stdlib-1.9.3/libdoc/test/unit/rdoc/index.html for Ruby version 1.9.3 classes and methods. The instruction I will provide here work for Ruby version 1.8.7 and hence for SketchUp 8.

      The following are the instructions Steve originally sent me for purposes of explanation. However, the attached zip has already incorporated the changes Steve instructed me to make so you don't have to perform them. Simply place the Unit_test folder in the zip file in your Plugins directory and you are good to go.

      Joe,

      I think I have cracked the nut on getting the Ruby Unit Test library to run under SketchUp!!! It takes a bit of work to set things up the first time, but after that it is easy to add more tests. Here's what I did:

      1. Create a subdirectory called Unit_test under your SketchUp Plugins directory.

      2. From your Ruby installation subdirectory lib\ruby\1.8 (I would stick to a 1.8 version, not 1.9, but have had no issues with 1.8.7), copy the "test" subdirectory and all its contents, the "optparse.rb"
        file, and the "optparse" subdirectory and all its contents into the Unit_test directory. Although it is possible to set up the load path to access the originals in the Ruby installation, I think it is wiser to make these copies so that files can be tweaked for SketchUp without risking damage to the main installation.

      3. Replace the file "testrunner.rb" in Unit_test\test\unit\ui\console with the attached version. This version fixes issues with output to the SKETCHUP_CONSOLE. If you want, you can delete the subdirectories other than console in Unit_test\test\unit\ui. They are for other forms of display, and I haven't been able to get any except the console to work within SketchUp (yet).

      4. Read the file Unit_test\test\unit.rb to understand the general implementation of the unit test harness. Also read Unit_test\test\unit\assertions.rb to learn all of the variations of test assertions you can use.

      5. When you code a unit test file, use the attached as an example of a few bits of fluff that you need to add to get the tests to run correctly inside SketchUp. Of course, each test method will need to have specific setup calls to get your test code into the desired test condition, and these will depend on what you are testing. Also, unless you get awfully complex, it may be necessary for a human to look at the SketchUp display to verify that something occurred correctly - the test harness can only verify that some code condition was satisfied, not that the drawing on the screen is right!

      6. The Ruby toolbar works great for running your tests and rerunning when you fix a bug in a class you are testing. However, I have had issues with the test classes themselves seeming "sticky", requiring you to kill and restart SketchUp before modifications to your test suite are noticed.

      7. The output appears on the SketchUp Ruby Console, but the test harness is pretty frugal with output, normally showing details only for tests that fail, so you don't have major issues with Console fill-up unless you have a lot of errors πŸ˜‰ .

      Try it and let me know how it works out for you!

      Steve

      --
      S L Baumgartner
      Fine Furniture

      favicon

      (www.slbaumgartner.com)


      Unit_test.zip

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: How to debug?

      @thomthom said:

      And under Windows you have this snippet to output the data to debuggers like DebugView:
      http://forums.sketchucation.com/viewtopic.php?f=180&t=31216&p=274668#p274467

      A friend of mine showed me how to interface Unit Test (http://ruby-doc.org/stdlib-1.9.3/libdoc/test/unit/rdoc/Test/Unit.html) to the SketchUp API and the Ruby Console. It works really great for certain classes of scripts or methods and it allows you to develop a suite of tests that you can run automatically.

      If anyone is interested I can add instructions to this forum.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • OnActiveModelObserver

      I was going to add this comment to the Observer's WishList but I am not sure I really have a problem or know what I am talking about. So I will pose it as a question.

      I have a script that opens a WebDialog. The script works fine on the PC. However, the Mac allows multiple models to be open with only one having focus and the one with focus is the active model. When the active model changes I need to switch and update the WebDialog.

      Is there an observer for "onActiveModelChange" that would trigger when the Mac (or PC for that matter) changed active models? If there is a way to currently do this could someone tell me how. If not, I would like to see this high on the Observer's WishList. By the way, onNewModel and onOpenModel do not work for this application because I need an observer that triggers when switching between already open models on the Mac.

      posted in Developers' Forum
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: SketchUp 8 M2 is out!

      @jbacus said:

      @chiefwoodworker said:

      I teach the free version of SketchUp in addition to using the Pro license for my own work so Layout is not a general solution.

      If you're teaching SketchUp to students, an 'Education' license may be the best solution. SketchUp Pro is available for cheap (sometimes free) to schools, teachers and students. Are you teaching in a context that makes you eligible for that program?

      john
      .

      Hi John,

      I teach at local community colleges and woodworking schools. I don't know if that qualifies me for an Education license, but I will look into it. Thanks for the heads up.

      posted in SketchUp Discussions
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: SketchUp 8 M2 is out!

      @jbacus said:

      @chiefwoodworker said:

      The biggest problem is in printing to scale.

      LayOut is the better solution to this problem and it contains many tools that will help you print more effectively to scale.

      john
      .

      See my reply to Jeff Hammond on this issue. LayOut is not a solution for those who do not have a Pro license which most of my students do not. Besides, a bug is a bug and should be fixed, especially if it has been around for 8 major version releases and numerous maintenance releases. This just isn't very professional of Google and its SketchUp team. But I will live and use SketchUp anyway ;<)

      posted in SketchUp Discussions
      ChiefwoodworkerC
      Chiefwoodworker
    • RE: SketchUp 8 M2 is out!

      @unknownuser said:

      @chiefwoodworker said:

      I just installed it and was really disappointed that the Print functionality is still broken.

      hey chief.. you have suPro so maybe save some headaches and do your printing via layout?

      I teach the free version of SketchUp in addition to using the Pro license for my own work so Layout is not a general solution. I can't tell you how many students trip over this problem and are put off by it. I know how to work around it but beginners don't. Here is an email that I got just this morning.

      "joe.
      i have now been trying for a total of more than 40 hours just to print to scale. i have tried hundreds of different combinations of scales and measurements on 3 different computers.writing down every detail as i go.. there is no pattern in the times it will print to scale and the times it wont. it is just random. i have no choice but to try another way all together. can you recommend another program that i can send the images to to continue my work elsewhere?

      thanks"

      This is a problem Google should correct. I don't understand why, after 8 versions, they haven't addressed it.

      posted in SketchUp Discussions
      ChiefwoodworkerC
      Chiefwoodworker
    • 1 / 1