- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I have an iLogic script that is used for checking balloons for overrides. It loops through each sheet, then each balloon on the sheet and if it finds an override it will pop up a message box to let the user know.
I'm trying to add some functionality so that it will zoom to the location of the overriden balloon so that the user can get a look to review without needing to exit and restart the script. Here's what I have right now:
oBalloon.Parent.Activate 'goes to corresponding sheet
ThisApplication.CommandManager.ControlDefinitions.Item("AppZoomAllCmd").Execute
ThisApplication.ActiveView.Update()
oDoc.SelectSet.Clear
oDoc.SelectSet.Select(oBalloon)
' ThisApplication.CommandManager.ControlDefinitions.Item("AppZoomSelectCmd").Execute
' ThisApplication.ActiveView.Update()
This is mostly working, it takes you to the sheet and selects the balloon (or balloon set). What I'd really like though, is to zoom to the balloon itself. I've tried several variations of the last 2 lines, but I haven't gotten anything to work yet. I tried using execute2(true), all the various "AppZoom..." commands I could find, declaring a global command manager object etc.
Does anyone know how I can zoom to a selected object in a drawing? If I could even get windowzoom to work programmatically I could get the coords of the bubble and then set an offset for the selection, but I haven't been able to figure that out either.
Solved! Go to Solution.