Plugin for Sketchup using VB.NET or C#
-
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
-
Hello Leonardo,
I created a few for customers.
-
Using visual studio create a new project type of a windows class library. In your dll expose public methods to be accessed from sketchup.
-
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
-
-
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
-
@morisdov said:
Hello Leonardo,
I created a few for customers.
-
Using visual studio create a new project type of a windows class library. In your dll expose public methods to be accessed from sketchup.
-
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
-
-
-
@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.dllEven 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
-
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
Advertisement