sketchucation logo sketchucation
    • Login
    1. Home
    2. isoz
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    I
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 6
    • Groups 1

    Posts

    Recent Best Controversial
    • How can i run a script outside sketchup!

      Hello guys! I want to make a program in VB that send some values to a plugin in sketchup to orbit, pan or move inside sketchup.

      how can i do this? how can i execute a plugin outside sketchup and send some values.
      Everytime the VB value change the sketchup plugin execute and do something like orbit using VB values?

      posted in Developers' Forum
      I
      isoz
    • How can i get a hinge rotation value and put into a Variable

      Hi! is it possible Sketchyphysics to get a hinge value when rotate?? if i put $f.to_f into controller box the hinge becomes a servo 😞 pls help!

      posted in SketchyPhysics
      I
      isoz
    • RE: How to Write variable value into test.txt file

      I got it!!!! file.open works fine in webconsole, but inside script box dont! becouse open method is private.. so this is the code
      File.send(:open,'c:\foo.txt', 'wb') {|f| f.write $f }

      send "force" access to the method open. i think script box try to access File class and has no access.
      Sorry for my english i hope you guys understand and tnx for the help.

      posted in Developers' Forum
      I
      isoz
    • RE: How to Write variable value into test.txt file

      @sdmitch said:

      It could be something as simple as trying to write a file to the root directory. Windows Vista says that I don't have access even from the admistrator account.

      Try this

      	File;;open(File.join(File.dirname(__FILE__),'foo.txt'), 'wb') {|f| f.write $variablename } 
      > 
      

      which will create the file in the script directory.

      Tnx iam going to test this when i get home, but i think the problem is this (private method `open' called for....
      the Class File.open is private needs to be public i think.... where can i change this? where is this class?

      posted in Developers' Forum
      I
      isoz
    • RE: How to Write variable value into test.txt file

      @sdmitch said:

      Ruby uses the '' to quote the next character so in the script you either need to double the character '\' or use '/' instead.

      'wb' ??? Sketchup uses Ruby 8.? version and this may not be supported. I don't find this context in my Ruby reference book.

      Hello Sdmitch! tnx!

      I tried what you told, but same error 😞 any ideia?
      File::open('c:/foo.txt', 'w+') {|f| f.write $variablename }

      Works fine on console but not into script box.

      posted in Developers' Forum
      I
      isoz
    • How to Write variable value into test.txt file

      Hello guys my name is Gustavo and iam from Brazil, i would like to know how to how to Write variable value into (Ex:test.txt) file.

      Iam using this code inside WebConsole " File::open('c:\foo.txt', 'wb') {|f| f.write $variablename } " it Works!!! create a file and writes variable value but when i try this same code inside Script area give me this msg error
      String doesn't compile: Error in Script:
      File::open('foo.txt', 'wb') {|f| f.write 'ruby!' }

      String doesn't compile: Error in Script:
      File::open('c:\foo.txt', 'wb') {|f| f.write 'ruby!' }

      private method `open' called for MSketchyPhysics3::SP3xCommonContext::File:Class#<RuntimeError: Error in Script:
      File::open('c:\foo.txt', 'wb') {|f| f.write 'ruby!' }

      private method open' called for MSketchyPhysics3::SP3xCommonContext::File:Class> C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:1314:in initEvents'
      C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:1342:in initialize' C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:729:in new'
      C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/ControllerCommands.rb:729:in createBody' C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:387:in createBodyFromCollision'
      C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:254:in dumpCollision' C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:238:in each'
      C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:238:in dumpCollision' C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:763:in initialize'
      C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1623:in new' C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1623:in startphysics'
      C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1650:in physicsTogglePlay' C:/PROGRA~2/Google/GOOGLE~1/Plugins/SketchyPhysics3/sketchyphysicstool.rb:1738 (eval):3:in call'
      (eval):3

      posted in Developers' Forum
      I
      isoz
    • 1 / 1