• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

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 9 Aug 2010, 01:11

    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 9 Aug 2010, 12:19

      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 9 Aug 2010, 14:36

        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 9 Aug 2010, 16:36

          @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 10 Aug 2010, 14:38

            @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 11 Aug 2010, 11:09

              @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 18 Aug 2010, 09:53

                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
                1 / 1
                • First post
                  1/7
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement