- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am using Civil 3D 2016.
I have been struggling with Lab4; learning to write VB.NET apps for AutoCAD.
Labe 4 is creating a Palette and working with Events. I was able to get the palette to work but I had to comment-out the User Control statements. There must be components not mentioned in the LAB4 documentation. In the Lab4 Complete solution there are several UserControl1 Classes whos complexity appear outside the scope of creating a simple palette. So I have to ask; what is the User Control supposed to provide? The statements follow for reference:
Imports System.Runtime
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Windows
Imports System.Windows.Controls
'
Namespace myPalette
Public Class myPalette
Public myPaletteSet As PaletteSet
'Public myPalette As UserControl1
<CommandMethod("Palette")> _
Public Sub palette()
If (myPaletteSet = Nothing) Then
myPaletteSet = New PaletteSet("My First Palette", New Guid("AA501203-A0EA-4A3F-BCD5-01F8D7A5F3F1"))
'myPalette = New UserControl1
'myPaletteSet.Add("My First Palette", myPalette)
End If
myPaletteSet.Visible = True
End Sub
End Class
End Namespace
Solved! Go to Solution.