.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Windows menu with option without winforms in csharp

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
jose_coimbras1
394 Views, 5 Replies

Windows menu with option without winforms in csharp

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.

5 REPLIES 5
Message 2 of 6
kdub_nz
in reply to: jose_coimbras1

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

Message 3 of 6
jose_coimbras1
in reply to: kdub_nz

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.

 

Message 4 of 6
_gile
in reply to: jose_coimbras1

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

Message 5 of 6
jose_coimbras1
in reply to: _gile

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.

Message 6 of 6
_gile
in reply to: jose_coimbras1

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report