We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2010-10-28 07:59 AM - last edited on 2023-08-03 10:53 AM by Doreena Deng
OSErr DOConvertUnId() { API_Element element; API_ElementMemo memo; API_DatabaseInfo dbInfo; API_Guid parentGuid = APINULLGuid; Int32 ii, num; SetDB(FLOORPLAN);//our function BNZeroMemory(&dbInfo, sizeof(API_DatabaseInfo)); if(ACAPI_Database(APIDb_GetCurrentDatabaseID, &dbInfo, NULL) == NoError) { ACAPI_Element_GetNum(API_ObjectID, &num); for(ii = 1; ii <= num; ii++) { if(ACAPI_Element_Filter_Index(API_ObjectID, ii, APIFilt_IsEditable)) { memset(&element, 0, sizeof(API_Element); element.header.typeID = API_ObjectID; element.header.index =ii; if(ACAPI_Element_Get(&element) == NoError && element.object.libInd == utLibIndStore->DoorExtraInd) { memset(&memo, 0, sizeof(API_elementMemo); if(ACAPI_Element_GetMemo(element.header.guid, &memo) == NoError) { parentGuid = ACAPI_element_UnIdToGuid(dbInfo.databaseUnId, (GS::Uint32) GetParamValue(memo.parms, “parent_unid”)); if(parentGuid != APINULLGuid) { char guidStr[64]; APIGuid2GSGuid(parentGuid).ConvertToString(guidStr); GiveMsg(guidStr); } } } } } } }This function giving the guid message but the guid it displays is of one of the wall (not the wall contained my door), not door.
2010-10-29 07:01 AM
2010-11-01 01:56 AM
parentGuid = ACAPI_element_UnIdToGuid(dbInfo.databaseUnId, (GS::Uint32) GetParamValue(memo.parms, "parent_unid"));But I am getting guid of wall instead of door. ( if I open my drawing with ArchiCAD 9.0 “parent_unid” stored in the doorExtra object is unId of one of the door.
2010-11-05 05:02 AM