.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I am having issue with autocad with .net addin.
Here is the scenario :
I am showing model up of wpf application on autocad application.
As am showing wpf application as model popup,Once i opne the model popups , autocad applications is in disable mode untill wpf model pop up closed. This is working fine.
But, while doing any operations in wpf model pupup, if wpf addin is throughs any exception
Wpf model is in open,Autocad is getting enabled but is should not enable.,
Please help me on this.
Regards,
Raman
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Raman,
I'n very sorry, but I don't understand your question. Please would you rewrite it more expansively. Also, providing a small sample to demonstrate the problem will help the people on this forum better understand your problem.
Stephen Preston
Autodesk Developer Network
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
Please find the attachment with below details
1. Project -- solution structure with two projects.
- Autocad project
- model pupup project.
2. Netload -- Net loading the autocad dll
3. showmodelpopup - displaying popup using below code snippet
[CommandMethod("ShowModelPopUp")]
publicvoid ShowModelPopUp()
{ newModelPopUpViewModel().ShowModelPopUP(); }
4. Execeptionmessagefrom autocad -- Getting autocad error message
5. EditingAutocad -- Able to access autocad menu bar, even though model pup up is in open state.
I am facing issue as shown in image 4 (Execeptionmessagefrom). When ever some error throws from autocad main application. i will get access to autocad application access, even though model popop is open state.
I don't allow to access autocad application access, when model popup is in open state
Please help me on this.
Regards,
Raman
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
The only files you've posted so far are image files.
I woudln't expect much in the way of help without showing the code (and when I say 'show', I don't mean an image showing the code).
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I am here with sample project for explaining the issue.
Net load the given sample project into autocad application and given the command as "ShowModelPopUp"
We can see one model pop up with Button and some text.
On click of the button("Rise Unhandled exception"). Autocad application throws an exception message.
After closing the autocad error message box, I am able to access autocad application, even though the model pop up is in open state., Actually i should not allow user to access autocad application and show model pop up.
Please guide me on this.
Regards,
Raman
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello Raman,
The project that you shared is not in a buildable form. So cant really try to reproduce that behavior.
If you are trying to show a WPF window inside AutoCAD as a modal window then you must be using :
Autodesk.AutoCAD.ApplicationServices.Application.S
Also, I fail to understand the reason why it is so important for you to have this modal behavior when there is an exception. If there is an exception, AutoCAD will try and want to grab the user's attention to submit a CER which is mostly what a user would want to do in such a scenario.
Balaji
Developer Technical Services
Autodesk Developer Network
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
Thanks for your response on this issue.
As you have mentioned above post, I have used below statement for opening model pop up
Autodesk.AutoCAD.ApplicationServices.Application.S
Now, on getting error, model popup is not minimizing , that's what I am excepting.
One issue here is, even though, model pop up is open on AutoCAD, I am able to access AutoCAD tool bar, that should not be.
Please help me on this issue
Regards,
Raman
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Can you post some code showing the error?
Also why can't you use a palette? I have programs that bring up palettes automatically while in a command and automatically disappear when the comment ends. If you want i can post some code.

“We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”
Re: Issue with Model popup in autocad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I am here with sample project.
Please netload the dll named "IssuewWithModelPopup.dll"
After loading above dll to autocad application
Enter command as "SHOWAUTOCADMODELPOPUP"
We will get one popup with button text "Rise Unhandled exception".
On Click of button we will get autocad exception dialog.
Once i closed, autocad exception dialog,
Autocad is getting enabled but is should not enable.,
Please help me on this.
Regards,
Raman


