SIR,
When nodes are selected and wanted to zoom to that selection is easier
if provided this to zoom to selection for nodes as well
regards
sriram
I've made some changes to make it more convenient to change the settings for this macro, which is something that one might or might not wish to do fairly often. It would depend on the variety of work one is doing, and on personal preference.
The .GMS file:
JQ_Zoom_to_Selected_Nodes_2018_08_04_2343.zip
When that is installed, it looks like this in the Macro Manager:
The JQ_Zoom_to_Selected_Nodes sub is the one that is run to make the "zoom to selected nodes" take place. That's the sub to which one would assign a keyboard shortcut for frequent use, or perhaps a button on a CommandBar.
For this version, no editing of the VBA code is necessary to change the settings. Instead, there is a userform for that, launched by the Start_Zoom_to_Selected_Nodes_Settings sub:
Each of those ComboBoxes can remember up to ten "most recently used" values, and the information is persistent between sessions (stored in the Registry). The "Clear MRU Lists" button clears all values from both of these lists.
The Remove_Zoom_to_Selected_Nodes_Settings_Registry_Entries does just what the name implies.
Here's a video where I show this macro in use. I've assigned "N" as the keyboard shortcut.
Zoom to Selected Nodes demo 01
Edited 2018-08-04 - new .GMS file that fixes a problem where the "padding" was not being correctly figured for certain sizes of selections.
Thank you John for writing this awesome macro (and shark_ too of course), and thank you pkg_sriram for the request.This is an enhancement that I have been thinking about several times.It is incredibly useful and should of course be one of the standard zoom levels in Draw.The standard shortcut could be the same as Zoom to Selected (objects/nodes depending on selection).Funny that no one (myself included) to my knowledge has asked for this before.Thanks again, all of you.
In addition to what I wrote in previous post John (maybe I'm asking for too much), would it be possible to combine the Zoom to Selected/All macro that you wrote a while ago, with this Zoom to Selected Nodes macro?I'm thinking like this:With one single shortcut or button we can 1.) zoom to selected objects, or 2.) zoom to selected nodes, or 3.) if nothing is selected then zoom to all objects or maybe full page (optional)?Add the ability to adjust padding like you did with nodes.Wouldn't that be nice?
eskimo sir,
Can you give this for only one command for all types of graphics,
For instance... if i select the text , it zooms to selection. similarly it selects the nodes to zoom to selection, similarly if i select segement (like shen i select the segment using shape tool, where a small dot is displaed that segment is selected)
Only one command, not a separate commands for zoom to selection
Ronny Axelsson said:With one single shortcut or button we can 1.) zoom to selected objects, or 2.) zoom to selected nodes, or 3.) if nothing is selected then zoom to all objects or maybe full page (optional)?Add the ability to adjust padding like you did with nodes.
I really like that idea, Ronny!
I especially like the idea of having user-selectable "padding" and "minimum view area" applied when performing a zoom to selected objects. That would be especially useful when I have selected a very tiny object (usually from imported content).