Highlight area inside polyline like the AREA command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to approach the problem from a few directions and I'm not sure which would be the best way.
I want to use the AREA command that is built into AutoCAD to select lines and get the highlighted area inside, as well as the AREA commands nice REMOVE mode which removes area from the calculation as well. We use this work flow already in another context, but I'm trying to use this same work flow in our .NET plugin to get the area.
I know how to launch the command using
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("._area add object", true, false, true);
What I dont know how to do would be retrieve the area from the command once it is through.
I'm also wanting to launch this command from a button on a ModalDialog. So I want to
Click a button
hide the dialog
Run the area command
return dialog when the area command is done
read the area that the area command calculated.
I'm not sure how to register that the AREA command is done running in order to unhide the dialog.
I could just recreate the AREA command using PromptEntityResult and KeywordResult, but then I wont get the nice highlighting of the AREA command....
Any help would be great!