Hi, I have a requirement to capture/track the changes to an entity’s bounds in realtime, I need to display the values as it progresses to a web-dialog. something like how the onProgressChanged listener works in java,
The EntityObserver has the onChangeEntity method which is triggered after the entity is modified , is there a way I could capture and track the changes e.g., say while a user is dragging an edge to resize.
Thanks ! but Is there any way I can achieve a similar feature?? It’s just an add on that shows an entity’s measurement on a web-dialog, and so we decided it’l be a good feature if we’re able to reflect the realtime changes in a bigger space instead of a tiny box in the status bar
Timer…? Ugly - and fragile -, but I cannot think of any other hook to use. And I’m not even sure if you are able to get the data in the middle of native tools like that any way.
By the way - is this related to your own custom Ruby tool? In which this is much easier as you actually have control over the mouse events. But for generic capture data outside the bounds of your own tool the API has nothing to offer I’m afraid.
Thanks but out off the top of your mind are there any extensions that you’re aware of that does this or has a similar feature?
Or else can we write our own Observer to achieve it i.e capture mouse events like drag and release?
I’ve not seen extensions that does such thing, no.
You’d have to hook into the low level system events your self, but I guess that could work. But remember you also have users who use keyboard shortcuts.
And note if you did do this and made it work - you really want to make sure you make no model changes as that could interfere with the active tool and probably make SketchUp crash because you change the state of the model during an operation which isn’t your own.