Archicad C++ API
About Archicad add-on development using the C++ API.

View notification

Anonymous
Not applicable
Is there a notification available for when a user changes the 3D view, as in a pan, rotate, zoom etc? A camera modification in the 2D plan view triggers a notification, but I can't see how to catch it in the 3D view. Suggestions appreciated.
5 REPLIES 5
Anonymous
Not applicable
I'm not aware of any notification for 3d view cameras (but there might possibly be a way I don't know about). For my plugin I check the ArchiCAD camera position from the timer of a dialog (DG_MSG_NULL).

Paul
Anonymous
Not applicable
Thanks for the feedback. I ended up doing a similar thing: polling camera transform in a bg thread.
Anonymous
Not applicable
Actually I think your way is better. I'm getting all sorts of stability problems running worker threads in an AddOn. So thanks again for the suggestion.
Ralph Wessel
Mentor
MarkHenryC wrote:
Actually I think your way is better. I'm getting all sorts of stability problems running worker threads in an AddOn. So thanks again for the suggestion.
Perhaps this has changed, but as far as I know a worker thread shouldn't attempt to interact with ArchiCAD through the API. The API is currently designed for add-ons running on a single thread and running only when ArchiCAD specifically invokes them. Attempting any API access outside of that context is likely to cause instability. Perhaps someone for GS could comment?
Ralph Wessel BArch
Anonymous
Not applicable
Thanks for that info, Ralph. That would certainly explain some problems I'm having (usually in the kernel/context switching area).