Jump to content


My VB.net plugin sample -HelloWorld.


  • You cannot reply to this topic
No replies to this topic

#1 cean

    Member

  • Members
  • PipPip
  • 13 posts

Posted 05 April 2012 - 10:11 AM

Hi,

Tried to write a plugin with vb.net express 2010 targeted .net 3.5.

Here is my code and screen shot:

Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports Teigha.DatabaseServices
Imports Teigha.Runtime
Imports Teigha.Geometry
Imports HostMgd.ApplicationServices
Imports HostMgd.EditorInput
Imports HostMgd.Windows
Imports Platform = HostMgd
Imports PlatformDb = Teigha
Namespace bjVBnanoCAD
    Public Class Class1
	    <CommandMethod("HelloWorld")> _
	    Public Sub bjHelloWorld()
		    Dim ed As Editor = Platform.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor
		    ' Print message to command line
		    ed.WriteMessage("Hello nanoCAD plugin with vb.net express 2010.")
	    End Sub
    End Class
End Namespace


so cool. love nanoCAD.

Cean

Attached Thumbnails

  • Attached Image: vb.gif






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users