andydandy74/Monito

[Global] Better zooming

andydandy74 opened this issue · 1 comments

Need to get the width and height of the target objects in order to properly calculate the zoom factor

As per Mike's advice, let's try selections again to circumvent the scaling issues with annotations.

var dynamoSelection = typeof (DynamoModel).Assembly.GetType("DynamoSelection");
var selectionInstance = dynamoSelection.GetProperty("Instance", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
var clearMethod = dynamoSelection.GetMethod("ClearSelection", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public);
clearMethod.Invoke(selectionInstance.GetValue(null), null);