In an application I'm working on, I had two CommandMethods.
One was a "Find" style function, where a user would enter some data, some processing was completed, relevant block or other Object data was seleted (I'm using Editor.SetImpliedSelection(ObjectId)), and then I would run
SendStringToExecute("ZOOM\nOBJECT\n", false, false, false);
The end result was a dynamic zoom in on the objects in question, which our users like.
The second command launches a dialog box. It's got a CommandFlags.UsePickSet with Editor.SelectImplied(), so the user can either select relevant objects and run the command, or run then select, and they get the dialog either way.
I now need to make a combined command that zooms in, and launches the dialog in one go. I'm running into all sorts of issues with this.
The end result I want is that the user supplies their original input, dynamic zoom takes place, and then the dialog pops up. I'm not sure how to make this happen, just like that, in that order.
The best solution, imho, is to not use the SendStringToExecute. Do the zoom in your code and don't rely on native command calls. Here are some examples to get you going:
http://forums.autodesk.com/t5/NET/Zoom-to-Objects/m-p/2788358#M20933
I straight-copied those in and gave them each a shot. Hallex's didn't work how I expected, but the others did zoom in on an object correctly. The problem here is that they don't dynamically zoom in on the target object, instead they are instant.
That raises the question of if there's a good, programmatic way to dynamically zoom. jboone threw an idea my way in this thread, and I haven't heard of another implementation (yet). If you have any alternative ideas, I'm all ears, before I get to writing my own.
Hi,
You can have a look here too:
http://through-the-interface.typepad.com/through_the_interface/2008/06/zooming-to-a-wi.html