Jump to content

Complete beginner question


Andrew1979

Recommended Posts

I am trying to learn .net for AutoCAD but it seems before I can even look at the language, I have to set up Visual Studio.

 

I have followed tutorials online, but they all are using a much earlier version of Visual Express than what I could get my hands on.

 

I have followed everything I can so far, but for some reason, some commands that are used don't work.

 

Namely . It is just black text in the window and always causes a debug error as its not recognised. I have also downloaded and referenced the ObjectARX SDK files but still doesn't work.

 

Does anybody know why this command isn't being recognised?

 

This is what I have so far:

 

Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry

Public Class Class1
   <CommandMethod("HelloWorld")>
   Public Sub HelloWorld()
       Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
       ed.WriteMessage("HelloWorld")

   End Sub

End Class

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...