Hello! I'm new. I've been messing around with ObjectARX for a good... week or so? Hopefully I'm posting in the right subforum.
I'm working on some functions that will allow a user to enter an attribute of a block, locate that block, and then zoom in on it. This is what I've done so far.
long entityIDHandle = getBlockbyAttribute(attribute); Handle hn = new Handle(entityIDHandle); ObjectId[] entityID = new ObjectId[1]; entityID[0] = db.GetObjectId(false, hn, 0); editor.SetImpliedSelection(entityID); document.SendStringToExecute("ZOOM\nOBJECT\n", false, false, true);
I know a lot of people hate the dynamic zoom of AutoCAD but that's actually what I'm going for here. I want to see the drawing zoom in to the block in question. Currently the way I've been able to achieve that is by selecting the block itself, and then running ZOOM OBJECT through the editor. (I don't know if there is a better way to do this)
I want it to be slower. Think... Google Earth. I've tried adjusting ZOOMFACTOR but that doesn't seem to affect the built in Zooms. Is there a value I can change in my code that will slow down the zoom?
You might try to find a center point and put a sleep timer into making the center smaller and smaller and have the center minus what ever scale you have in about 4 or 5 increments. Of course this would take some math to calculate how far out you are and how far in you want to go.
Thanks for the reply. My work on this particular project is dicated by the internal client I'm assisting, if they think it's worth it for me to put more time on the zoom function, I'll give your method a shot.