Message 1 of 2
HelloWorld program.

Not applicable
08-10-2005
01:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have selected Autodesk.AutoCAD.Interop.common as my GAC reference. Why won't this program compile????
'
' Created by SharpDevelop.
' User: ESepich
' Date: 8/10/2005
' Time: 12:20 PM
'
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Imports System
Imports System.Runtime.InteropServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports acadApp = Autodesk.AutoCAD.ApplicationServices.Application
Public Class HelloWorld
_
Public Sub HelloCommand()
acadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage( _
vbNewLine & "Hello World!" & vbNewLine)
acadApp.UpdateScreen()
End Sub
End ClassM
ERRORS:
------ Build started: Project: HelloWorld Configuration: Debug ------
Performing main compilation...
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(11) : error BC30466: Namespace or type 'Runtime' for the Imports 'Autodesk.AutoCAD.Runtime' cannot be found.
Imports Autodesk.AutoCAD.Runtime
~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(12) : error BC30466: Namespace or type 'ApplicationServices' for the Imports 'Autodesk.AutoCAD.ApplicationServices' cannot be found.
Imports Autodesk.AutoCAD.ApplicationServices
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(14) : error BC30466: Namespace or type 'Application' for the Imports 'Autodesk.AutoCAD.ApplicationServices.Application' cannot be found.
Imports acadApp = Autodesk.AutoCAD.ApplicationServices.Application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(16) : error BC30481: 'Class' statement must end with a matching 'End Class'.
Public Class HelloWorld
~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(19) : error BC30451: Name 'acadApp' is not declared.
acadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage( _
~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(20) : error BC30451: Name 'vbNewLine' is not declared.
vbNewLine & "Hello World!" & vbNewLine)
~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(20) : error BC30451: Name 'vbNewLine' is not declared.
vbNewLine & "Hello World!" & vbNewLine)
~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(21) : error BC30451: Name 'acadApp' is not declared.
acadApp.UpdateScreen()
~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(24) : error BC30678: 'End' statement not valid.
End ClassM
~~~
Build complete -- 9 errors, 0 warnings
'
' Created by SharpDevelop.
' User: ESepich
' Date: 8/10/2005
' Time: 12:20 PM
'
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Imports System
Imports System.Runtime.InteropServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports acadApp = Autodesk.AutoCAD.ApplicationServices.Application
Public Class HelloWorld
_
Public Sub HelloCommand()
acadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage( _
vbNewLine & "Hello World!" & vbNewLine)
acadApp.UpdateScreen()
End Sub
End ClassM
ERRORS:
------ Build started: Project: HelloWorld Configuration: Debug ------
Performing main compilation...
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(11) : error BC30466: Namespace or type 'Runtime' for the Imports 'Autodesk.AutoCAD.Runtime' cannot be found.
Imports Autodesk.AutoCAD.Runtime
~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(12) : error BC30466: Namespace or type 'ApplicationServices' for the Imports 'Autodesk.AutoCAD.ApplicationServices' cannot be found.
Imports Autodesk.AutoCAD.ApplicationServices
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(14) : error BC30466: Namespace or type 'Application' for the Imports 'Autodesk.AutoCAD.ApplicationServices.Application' cannot be found.
Imports acadApp = Autodesk.AutoCAD.ApplicationServices.Application
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(16) : error BC30481: 'Class' statement must end with a matching 'End Class'.
Public Class HelloWorld
~~~~~~~~~~~~~~~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(19) : error BC30451: Name 'acadApp' is not declared.
acadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage( _
~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(20) : error BC30451: Name 'vbNewLine' is not declared.
vbNewLine & "Hello World!" & vbNewLine)
~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(20) : error BC30451: Name 'vbNewLine' is not declared.
vbNewLine & "Hello World!" & vbNewLine)
~~~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(21) : error BC30451: Name 'acadApp' is not declared.
acadApp.UpdateScreen()
~~~~~~~
C:\Documents and Settings\ESepich\Desktop\HelloWorld\HelloWorld.vb(24) : error BC30678: 'End' statement not valid.
End ClassM
~~~
Build complete -- 9 errors, 0 warnings