Palette

s_abeed
Enthusiast
Enthusiast

Palette

s_abeed
Enthusiast
Enthusiast

I am trying to implement a customize dockable UI with in AutoCAD and looking if there is working sample of PaletteSet. So I can use it as a base to start writing my logic. I need it in .NET

 

 

Thanks

0 Likes
Reply
Accepted solutions (1)
563 Views
6 Replies
Replies (6)

_gile
Mentor
Mentor

Hi,

You can see this 'tutorial' which which shows examples of user interfaces for AutoCAD, including a PaletteSet with Windows Forms and another with WPF and MVVM design pattern.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

s_abeed
Enthusiast
Enthusiast

thanks its looks good. Is there a buildable project for the logic? This guy try to explain all the concept one after the other but there are some missing pieces or maybe you have to build from start.

 

I found a one over here https://www.keanw.com/2007/07/using-a-palette.html

 

but the link to project is no more working

0 Likes

_gile
Mentor
Mentor

If someone provides you a "buildable project", you won't learn how to crete it and the next time you'll need to do such project you'll have to ask for another "buildable project".

Yes you have to build it from start. What are the "missing pieces"? There's no missing code.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

_gile
Mentor
Mentor
Accepted solution

You can either start from a Visual Studio project template for AutoCAD plugin (see this tutorial or this template sample) or start from scratch.

In the second case,
- in Visual Studio, create a new class library project targeting .NET Framework

- add references to AutoCAD libraries (accoremgd.dll, acdbmgd.dll, acmgd.dll setting their Copy Locale property to False

In any case,

- add a new item of type UserControl (named "PaletteTab") with some controls:

    - Label (lblLayer)

    - ComboBox (cbxLayer)

    - Label (lblRadius)

    - TextBox (txtRadius)

    - Button (btnRadius)

    - Button (btnOk)

- add event handlers to some controls:

    - txtRadius_TextChanged to txtRadius

    - btnRadius_Click to btnRadius

    - btnOk_Click to btnOk

- add the CustomPaletteSet and Commands class



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

hosneyalaa
Advisor
Advisor

@s_abeed 

try

7.gif

0 Likes

s_abeed
Enthusiast
Enthusiast

you shared a video only or more as I can only see a video

0 Likes