.NET

.NET

Reply
Contributor
h.sezenn
Posts: 18
Registered: ‎03-27-2013
Message 1 of 3 (244 Views)
Accepted Solution

how can I make multi pallete with vb.net ?

244 Views, 2 Replies
03-27-2013 03:16 PM

I have code like this:

'ensure single instance of this app...
Friend Shared m_ps As Autodesk.AutoCAD.Windows.PaletteSet = Nothing
' Define command
<CommandMethod("TestPalette")> _
Public Sub DoIt()
'check to see if paletteset is already created
If m_ps Is Nothing Then
'no so create it
m_ps = New Autodesk.AutoCAD.Windows.PaletteSet("My First Palette")
'create new instance of user control
Dim myPalette As Container1 = New Container1()
'add it to the paletteset
m_ps.Add("My First Palette", myPalette)
End If
'turn it on
m_ps.Visible = True
End Sub

 in this code has a only one pallete ( tab ) but , ı want to make 4 or 5 pallete . how can I do thiswith vb.net ?

 

_____________________________________________________________________________________
Everything For Duct

Hi,

 

The palette set tabs are the controls added to the palette set.

 

'ensure single instance of this app...
Friend Shared m_ps As Autodesk.AutoCAD.Windows.PaletteSet = Nothing
' Define command
<CommandMethod("TestPalette")> _
Public Sub DoIt()
'check to see if paletteset is already created
If m_ps Is Nothing Then
'no so create it
m_ps = New Autodesk.AutoCAD.Windows.PaletteSet("My First Palette")
'create new instance of user control
Dim myPalette1 As Container1 = New Container1()
'add it to the paletteset
m_ps.Add("My First Palette", myPalette1)
'create new instance of user control
Dim myPalette2 As Container2 = New Container2()
'add it to the paletteset
m_ps.Add("My Second Palette", myPalette2)
'create new instance of user control
Dim myPalette3 As Container3 = New Container3()
'add it to the paletteset
m_ps.Add("My Third Palette", myPalette3)
'and so on...
End If
'turn it on
m_ps.Visible = True
End Sub

 

*Expert Elite*
_gile
Posts: 2,133
Registered: ‎04-29-2006
Message 2 of 3 (235 Views)

Re : how can I make multi pallete with vb.net ?

03-27-2013 03:40 PM in reply to: h.sezenn

Hi,

 

The palette set tabs are the controls added to the palette set.

 

'ensure single instance of this app...
Friend Shared m_ps As Autodesk.AutoCAD.Windows.PaletteSet = Nothing
' Define command
<CommandMethod("TestPalette")> _
Public Sub DoIt()
'check to see if paletteset is already created
If m_ps Is Nothing Then
'no so create it
m_ps = New Autodesk.AutoCAD.Windows.PaletteSet("My First Palette")
'create new instance of user control
Dim myPalette1 As Container1 = New Container1()
'add it to the paletteset
m_ps.Add("My First Palette", myPalette1)
'create new instance of user control
Dim myPalette2 As Container2 = New Container2()
'add it to the paletteset
m_ps.Add("My Second Palette", myPalette2)
'create new instance of user control
Dim myPalette3 As Container3 = New Container3()
'add it to the paletteset
m_ps.Add("My Third Palette", myPalette3)
'and so on...
End If
'turn it on
m_ps.Visible = True
End Sub

 

Gilles Chanteau
Contributor
h.sezenn
Posts: 18
Registered: ‎03-27-2013
Message 3 of 3 (208 Views)

Re : how can I make multi pallete with vb.net ?

03-28-2013 01:07 AM in reply to: _gile

Thank you so much. its works  :smileyhappy:

 

_____________________________________________________________________________________
Everything For Duct
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.