sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Plugin for Sketchup using VB.NET or C#

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 5 Posters 9.8k Views 5 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.
    • L Offline
      LSeibt
      last edited by

      Hello everyone

      I wonder if someone has already developed a plugin for Sketchup using VB.NET or C#.
      I saw that I add as a reference library of Sketchup as a COM
      But I found no example of coding in these languages over the Internet
      Could anyone help me with this?

      Thanks

      1 Reply Last reply Reply Quote 0
      • M Offline
        morisdov
        last edited by

        Hello Leonardo,

        I created a few for customers.

        1. Using visual studio create a new project type of a windows class library. In your dll expose public methods to be accessed from sketchup.

        2. download from the web win32api.so and copy it into Sketchups Plugins folder. follow the examples on http://ruby-doc.org/docs/ProgrammingRuby/html/lib_windows.html

        Start slowly and advance in steps.

        Moris

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          We've had a few members post some VB-related files on the forum in the past. I'm not sure if these are of interest, but here are the posts:

          [1] http://forums.sketchucation.com/viewtopic.php?f=180&t=23441&start=0

          [2] http://forums.sketchucation.com/viewtopic.php?f=180&t=22828&start=0

          Hi

          1 Reply Last reply Reply Quote 0
          • L Offline
            LSeibt
            last edited by

            @morisdov said:

            Hello Leonardo,

            I created a few for customers.

            1. Using visual studio create a new project type of a windows class library. In your dll expose public methods to be accessed from sketchup.

            2. download from the web win32api.so and copy it into Sketchups Plugins folder. follow the examples on http://ruby-doc.org/docs/ProgrammingRuby/html/lib_windows.html

            Start slowly and advance in steps.

            Moris

            Actually what I had thought was to develop something directly in VB.NET that "converse" with Sketchup.
            I add in my project the COM "Sketchup 2.0 Type Library" which gives me access to the API commands SketchUp.
            I tried using the code that follows, but it always shows an error saying that the class is not registered.

            
            Imports SketchUp
            
            Public Class Form1
            
                Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
                    Dim app As SkpApplication = New SketchUp.SkpApplication
                    Dim doc As SkpDocument
            
                    doc = app.ActiveDocument
            
                End Sub
            End Class
            
            
            1 Reply Last reply Reply Quote 0
            • J Offline
              jhauswirth
              last edited by

              @lseibt said:

              @morisdov said:

              I tried using the code that follows, but it always shows an error saying that the class is not registered.
              [/code]

              You need to register it-
              regsvr32 sketchupreader.dll

              1 Reply Last reply Reply Quote 0
              • L Offline
                LSeibt
                last edited by

                @jhauswirth said:

                @lseibt said:

                @morisdov said:

                I tried using the code that follows, but it always shows an error saying that the class is not registered.
                [/code]

                You need to register it-
                regsvr32 sketchupreader.dll

                Even registering this DLL can not run this code
                Did you already wrote some code to Sketchup using VB.NET?
                Have some simple example that could show?

                Thanks

                1 Reply Last reply Reply Quote 0
                • P Offline
                  Pout
                  last edited by

                  i'm not into the dll stuff, but i'm currently working on communication between Sketchup and Microsoft PowerPoint and Microsoft Project.
                  Win32OLE.so can be used in that case

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

                  Advertisement