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

Please help with "ShowModalDialog"

3 REPLIES 3
Reply
Message 1 of 4
wcruz
707 Views, 3 Replies

Please help with "ShowModalDialog"

I have been trying without any luck to get this here line of code to work. I have searched as much as I can (2 days) and still can’t find anything. So I had to pop the question. What am I doing wrong?

What am I using?
VB.NET 2005 Express
AutoCAD 2006

What do I want to do?
Have AutoCAD.Application show my Windows.Form in “ShowModalDialog” .

When typing the code shown below, In the intellisense, “ApplicationServices “ is not part of AutoCAD, yet I see this same code all over on this forum. After the AutoCAD, I get “interop” It looks like I might be missing a reference. See the attached image that shows what I try to explain. I have also included a screen capture of my reference. Thanks in advance for your help.

This what I can’t get --> Autodesk.AutoCAD.ApplicationServices.Application

This is what I want to do --> AcadApp.ShowModalDialog(myForm);
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: wcruz

>This what I can't get --> Autodesk.AutoCAD.ApplicationServices.Application

If you are not using ObjectARX .NET API, you do not get that.


>This is what I want to do --> AcadApp.ShowModalDialog(myForm);

You cannot do that: Acad COM object AcadApplication does not have a method
to show your form as modal/modeless dialog. You need to show your form in
your own code

You may to describe what you want to do and how do you do it (a stand alone
app, or ObjectAXR .NET API app, or COM DLL use for Acad VBA?).

With VB.NET/C#, there are at least two types of Acad programming: COM
Automation/DLL, or ObjectARX .NET API. If you do not indicate what is you
are doing, it is difficult to point out a coorect direction you should be
going.
Message 3 of 4
wcruz
in reply to: wcruz

It can be done. I was missing these 2 references ACDBMGD.DLL and ACMGD.DLL. Now I'm able to see the "ApplicationServices" and now I'm able to show my forms created in VB.NET like so: "Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(frm_o)" instead of using frm_o.show.

William
Message 4 of 4
Anonymous
in reply to: wcruz

And this newsgroup is really about using AutoCAD's .NET API, not necessarily
the COM/ActiveX API.

Dan

"Norman Yuan" wrote in message
news:5552751@discussion.autodesk.com...
>This what I can't get --> Autodesk.AutoCAD.ApplicationServices.Application

If you are not using ObjectARX .NET API, you do not get that.


>This is what I want to do --> AcadApp.ShowModalDialog(myForm);

You cannot do that: Acad COM object AcadApplication does not have a method
to show your form as modal/modeless dialog. You need to show your form in
your own code

You may to describe what you want to do and how do you do it (a stand alone
app, or ObjectAXR .NET API app, or COM DLL use for Acad VBA?).

With VB.NET/C#, there are at least two types of Acad programming: COM
Automation/DLL, or ObjectARX .NET API. If you do not indicate what is you
are doing, it is difficult to point out a coorect direction you should be
going.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost