Windows menu with option without winforms in csharp

jose_coimbras1
Participant
Participant

Windows menu with option without winforms in csharp

jose_coimbras1
Participant
Participant

Hi.

Is possible to create some kind of Modeless or Palette menu (a window) whitout use Visual Studio forms?

I´s trying to avoid that complexity.

I achive to build a Palette only with JS HTML, but i think it loss some of the power of .net Csharp applied to Autocad.

 

Not very complex, some input fiels, buttons...

 

Thanks.

0 Likes
Reply
Accepted solutions (1)
422 Views
5 Replies
Replies (5)

kdub_nz
Advisor
Advisor

Gilles has published some samples for Forms, Palletes and  FTP  WPF here :
https://gilecad.azurewebsites.net/UserInterfaces.aspx

 

 FTP  WPF may suit your requirements.

 

Regards,

edit :  fixed WPF acromym 😞


// Called Kerry in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect.
Sometimes the question is more important than the answer.

class keyThumper<T> : Lazy<T>;      another  Swamper

0 Likes

jose_coimbras1
Participant
Participant

Hi.

 

FTP??

 

I already know that blogue i used some examples to make a modeless winform in CAD.

The example he put for Palette also uses winform i think, or not?

 

Anyway the key question is, if there are some way to build some menu, like palette without run Visual Studio... and that can be powerfull...

 

I achivied to build a Palette just with JS HTML CSS. It connects to :

 

 

<script type="text/javascript" src="https://df-prod.autocad360.com/jsapi/v4/Autodesk.AutoCAD.js"></script>

 

But for me there ar two negative points:
- The code is "open" anyone can see and modify it.
- Because the execute 

 

Acad.Editor.executeCommand("");

 it maybe missing some power ... (still exploring it).

 

 
Anyway its working... 
 
I would prefer to build a single DLL that can show a menu an use all .net api cad power...
 
Thanks.

 

0 Likes

_gile
Mentor
Mentor

Hi,

On one hand you say:


@jose_coimbras1  a écrit :

Anyway the key question is, if there are some way to build some menu, like palette without run Visual Studio...


And on the other and:


@jose_coimbras1  a écrit :
I would prefer to build a single DLL that can show a menu an use all .net api cad power...

How do you simply build a .NET DLL without Visual Studio?

Creating a GUI with WinForms in Visual Studio is anything but complex. If you want to avoid WinForms, you can use WPF (Windows Presentation Foundation), but in my opinion it is not at all less complex than WinForms, at least when you are a beginner.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes

jose_coimbras1
Participant
Participant

Hi thanks for your response.

 

I build DLL with the Visual C# compiler provided with Win 10. It´s no the last version but it works well for my needs.

I build for example anotation of polyline vertexes, manipulate text files and so on.

 

For some "projects" only comunicate with the user (work colleagues) with the prompt is not enought... for example if before drawing a typical road section, or something that requires a lot of inputs from the user, it´s better have some window where we can put some radio buttons or a dropdown menu.

The only problem using Visual Studio is that the versions change and it requires some advanced knowledge (or at the requires a hard learning curve to know all details). I try to avoid that.

 

I´me not a software engineer i´m a civil engineer, as you may agree working in .net requires some king of specialization different from as example the old and working LISP 🙂

Thanks for your posts, done a good job.

0 Likes

_gile
Mentor
Mentor
Accepted solution

Visual Studio would help you a lot with C# / .NET programming (intellisense, edition time errors, drag and drop controls in forms, ...).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes