I'm trying to follow the DevTV_AutoCAD_NET_Training_Session_4 which shows how to create a toolpalette. I created a Usercontrol like shown. I wrote some dimension style coding I would like to use in the toolpalette. I'm having some issues with the PaletteSet.Add Method (string, Control). Intellisense return an error saying "Value of type 'Dimension_Styles.UserControl1' cannot be converted to 'System.Uri'". I'm lost, don't know what to do or to look for...
Public Function Add( 'Input palette name name As string, 'Input palette control control As Control ) As Palette
What should be the palette's name?
What should be the control?
here's my code below;
Public Class DimStylePalette Public myPaletteSet As PaletteSet Public myPalette As UserControl1 <CommandMethod("palette")> _ Public Sub palette() If (myPaletteSet = Nothing) Then myPaletteSet = New PaletteSet("My Palette", New Guid("33EB0D00-1036-439B-8B27-A11BA4669211")) myPalette = New UserControl1 myPaletteSet.Add("My Palette", myPalette) End If myPaletteSet.Style = PaletteSetStyles.ShowPropertiesMenu Or _ PaletteSetStyles.ShowAutoHideButton Or _ PaletteSetStyles.ShowCloseButton myPaletteSet.Visible = True End Sub End Class
I'm new to vb.net &, coming from LISP, I have to say it's hard to come around...
Any help would be greatly appreciated...
Thanks!
Can't find what you're looking for? Ask the community or share your knowledge.