We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2016-12-14 04:49 AM - last edited on 2023-07-12 09:01 PM by Doreena Deng
2016-12-14 09:04 AM
IanTr wrote:Hello Ian,
Hello,
I've implemented all the below functions and put a breakpoint in them. It appears that none of the below is hit when I hide a layer/show all.
ACAPI_Notify_CatchProjectEvent
ACAPI_Notify_CatchViewEvent
ACAPI_Notify_CatchToolChange
ACAPI_Notify_CatchSelectionChange
ACAPI_Notify_CatchChangeDefaults
ACAPI_Notify_CatchNewElement
ACAPI_Notify_InstallElementObserver
ACAPI_Notify_CatchElementReservationChange
ACAPI_Notify_CatchLockableReservationChange
Not sure if I am using the right function call to intersect the above events. Not sure if relevant but when right click on model and 'Move', the functions below do get called.
GSErrCode __ACENV_CALL ElementEventHandlerProc ( const API_NotifyElementType *elemType )
static void OnElementNotify ( const API_Guid &guid )
Thanks in advance,
Ian
2016-12-14 08:23 PM
// Layer { API_Attribute attrib; BNZeroMemory( &attrib, sizeof (API_Attribute) ); attrib.header.typeID = API_LayerID; attrib.header.index = element.header.layer; if ( NoError == ACAPI_Attribute_Get ( &attrib ) ) { if ( ( attrib.layer.head.flags & APILay_Hidden ) == APILay_Hidden ) { return; } pMesh->AddParameter ( L"Layer", attrib.layer.head.name ); } }
2016-12-15 10:04 AM
IanTr wrote:Hi Ian,
Hello Akos,
Currently, the way we use Archicad is:
1. User load in Archicad model.
2. We have a "Send data" button that sends all the geometries to our external program. During this initial send, I checked the layer hidden flag. If the flag is set, then will skip over the geometry.
// Layer { API_Attribute attrib; BNZeroMemory( &attrib, sizeof (API_Attribute) ); attrib.header.typeID = API_LayerID; attrib.header.index = element.header.layer; if ( NoError == ACAPI_Attribute_Get ( &attrib ) ) { if ( ( attrib.layer.head.flags & APILay_Hidden ) == APILay_Hidden ) { return; } pMesh->AddParameter ( L"Layer", attrib.layer.head.name ); } }
3. However, after sending, I would like to receive notification if user changes the layer visibility on that object so that our program will update its state to reflect what Archicad is showing in realtime.
Currently we are doing that with position. If moved something in Archicad, our external program would update the position of that object in realtime.
Thank you,
Ian