Re: Error in a sample code ?
Try this instead (changes in red):
Code:
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Runtime.Interop
Public Class Class3
<CommandMethod("PrefsSetCursor")> _
Public Sub PrefsSetCursor()
Dim acPrefComObj As Object = Application.Preferences
acPrefComObj.Display.CursorSize = 100
End Sub
End Class
Tested successfully using Civil 3D 2011.
Also, when you have an error like that, if you hover the red underscore, you'll be presented a drop down button which usually offers some options to correct the error detected.
Re: Error in a sample code ?
Given the simplicity of the task being performed, this can be written a bit more succinctly:
Code:
Imports Autodesk.AutoCAD.Runtime
Public Class Class3
<CommandMethod("PrefsSetCursor2")> _
Public Sub PrefsSetCursor2()
Autodesk.AutoCAD.ApplicationServices. _
Application.Preferences.Display.CursorSize = 100
End Sub
End Class
Re: Error in a sample code ?
Quote:
Originally Posted by
RenderMan
Also, when you have an error like that, if you hover the red underscore, you'll be presented a drop down button which usually offers some options to correct the error detected.
Good, thanks !