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
Solved! Go to Solution.
Solved by _gile. Go to Solution.
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.
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
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.
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
Can't find what you're looking for? Ask the community or share your knowledge.