Mike,
Function is OK. Here's a piece of code that
works:
face="Courier New">Imports
color=#000000>
System.Runtime.InteropServices
face="Courier New" color=#0000ff size=2>Imports
face="Courier New" color=#000000> Autodesk.AutoCAD.Runtime
Public
size=2> Class
DemoClass
size=2>Implements
Autodesk.AutoCAD.Runtime.IExtensionApplication
size=2>Public
size=2>Sub Initialize()
size=2>Implements
Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize
size=2>Autodesk.AutoCAD.ApplicationServices.CommandLinePrompts.Message(vbNewLine
+ _
size=2>"DEMO Class successfully loaded..." +
vbNewLine)
size=2>End
size=2>Sub
size=2>
size=2>Public
size=2>Sub Terminate()
size=2>Implements
Autodesk.AutoCAD.Runtime.IExtensionApplication.Terminate
size=2>End
size=2>Sub
size=2><Autodesk.AutoCAD.Runtime.CommandMethod("DEMO1")>
_
size=2>Public
size=2>Function Demo1()
...
color=#0000ff size=2>End
color=#0000ff size=2>Function
face="Courier New">End
size=2>
size=2>Class
Sepich, you need to
load resulting DLL via AutoCAD's NETLOAD command. Also try to keep a DLL at
location found in AutoCAD's Search/Support Path (or create a new
one).
Regards,
Maksim Sestic
You also may need to make it a
SUB. I don't believe you can call a FUNCTION
since function implies a return
value. Change it to this and it'll work:
Public Class
EmployeeObject
<CommandMethod("create")> _
Public Shared Sub
Create()
-- Mike
___________________________
Mike
Tuersley
___________________________
the trick is to realize that there is
no spoon...