sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin Library] Win32API and Win32OLE so files

    Scheduled Pinned Locked Moved Plugins
    21 Posts 4 Posters 20.7k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      swajime
      last edited by

      I have this directly in the SketchUp ruby console:

      require 'win32ole'
      true
      if defined?(WIN32OLE); connection = WIN32OLE.new('ADODB.Connection'); end
      Error; #<WIN32OLERuntimeError; (eval);27;in `initialize'; unknown OLE server; `ADODB.Connection'
          HRESULT error code;0x800401f3
            >
      
      

      The link you put up did not come through.

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @swajime said:

        The link you put up did not come through.

        The original links in the 2nd post still work.
        (It's just that the editor has decided to encode pasted URLs, suddenly.)

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          I suggest starting a new (if there is not one,) topic in the Developers Forum.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • S Offline
            swajime
            last edited by

            Thank you. I did as you said and started a new topic http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=55202%26amp;e=0.

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              @swajime said:

              Error: #<NameError: (eval):27: uninitialized constant WIN32OLE>

              Did you first have the load statement:

              require("win32ole")

              or require("win32ole.so")

              Then you can test if the class was defined, via:

              if defined?(WIN32OLE)
              
                connection = WIN32OLE.new('ADODB.Connection')
              
               # more code ...
              
              end
              
              

              There is a chapter on WIN32OLE in:
              [doc] Programming Ruby (The "Pick-Axe" Book)

              💭

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                Did you see the link ?

                @dan rathbun said:

                Since someone is bound to ask, here are the online reference rdocs for these 2 libraries:

                • Win32API rdoc

                • WIN32OLE rdoc

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  @dan rathbun said:

                  There is a chapter on WIN32OLE in:
                  [doc] Programming Ruby (The "Pick-Axe" Book)

                  💭

                  Sysops have fixed the editor URL links (above.)

                  ☀

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    glro
                    last edited by

                    @dan rathbun said:

                    @glro said:

                    seems not to be compatible with sketchup 2013

                    (1) where is the so file on your machine ?

                    (2) please post the error message

                    1: in the plugins folder of sketchup

                    2:win32API.so error message

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      glro
                      last edited by

                      @dan rathbun said:

                      @glro said:

                      seems not to be compatible with sketchup 2013

                      (1) where is the so file on your machine ?

                      (2) please post the error message

                      sorry

                      problem solved

                      you were right: win32API.so and sketchup 2013 are compatible

                      thank you

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        @glro said:

                        sorry ... problem solved

                        you were right: win32API.so and sketchup 2013 are compatible

                        Yes I have no problem loading it.

                        What was your issue ?

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          glro
                          last edited by

                          @dan rathbun said:

                          @glro said:

                          sorry ... problem solved

                          you were right: win32API.so and sketchup 2013 are compatible

                          Yes I have no problem loading it.

                          What was your issue ?

                          still don't know

                          changed something (don't know what) and the problem disappeared

                          thank you for your comments

                          1 Reply Last reply Reply Quote 0
                          • Dan RathbunD Offline
                            Dan Rathbun
                            last edited by

                            ❗ FYI

                            SketchUp 2014

                            • Ruby v 2.0.0 - patchlevel 247

                            • win32ole.so file is included

                            • Win32API.rb file is included, which is a wrapper into the newer DL library, but allows the older WIn32API style calls.
                              %(#BF4000)[Do not copy these files from older Ruby versions into SketchUp's "Plugins" folder,
                              (or any of SketchUp's folders,) for versions 14 or higher !]

                            💭

                            I'm not here much anymore.

                            1 Reply Last reply Reply Quote 0
                            • 1
                            • 2
                            • 1 / 2
                            • First post
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement