2018-12-27 03:20 AM - last edited on 2022-10-04 04:46 PM by Daniel Kassai
void Do_CurtainWall_createAccessory(void) { API_Element element, mask; API_LibPart libPart; API_Guid guid, guid1,guid2; API_ElemTypeID typeID; GSErrCode err; BNZeroMemory(&element, sizeof(API_Element)); if (!ClickAnElem("Click a Curtain Wall to Modify", API_CurtainWallFrameID, nullptr, &typeID, &guid)) { WriteReport_Alert("No curtain wall was clicked"); return; } element.header.guid = guid; element.header.typeID = typeID; err = ACAPI_Element_Get(&element); guid2=element.cwFrame.symbolID; guid1 = element.cwFrame.owner; ////return index/// BNZeroMemory(&libPart, sizeof(libPart)); GS::snuprintf(libPart.docu_UName, sizeof(libPart.docu_UName) / sizeof(GS::uchar_t), L("D-T吊件")); err = ACAPI_LibPart_Search(&libPart, false); if (err != NoError) { return; } int indac = libPart.index; BNZeroMemory(&element, sizeof(API_Element)); // element.header.typeID = API_CurtainWallAccessoryID; element.cwAccessory.head.typeID = API_CurtainWallAccessoryID; err = ACAPI_Element_GetDefaults(&element, nullptr); if (err != NoError) { ErrorBeep("ACAPI_Element_GetDefaults", err); return; } element.cwAccessory.refFrame = guid; //element.cwAccessory.category = APICWAccC_Custom; element.cwAccessory.owner = guid1; //element.cwAccessory.hasSymbol = true; //element.cwAccessory.symbolID = guid2; //element.cwAccessory.symbolID = guid2; //element.cwAccessory.libInd = indac; err = ACAPI_Element_Create(&element, nullptr); // ACAPI_DisposeElemMemoHdls(&memo); }hello everyone!
2018-12-27 02:59 PM
2018-12-29 02:38 AM
Tibor wrote:Hi Tibor!
Creating new curtain wall subelem (frame, panel, accessory, junction) is not available via API using the ACAPI_Element_Create or ACAPI_Element_CreateExt functions.
You can add only new frames to an existing curtain wall by using the ACAPI_Element_Change on the curtain wall and passing the new frames in the cWallFrames field of the memo.
2019-01-10 04:20 PM
vanxis wrote:Sorry if I was not clear enough.
I don't know how I need to enter parameters in memo if I want to create a accessory or a juction.
2019-01-11 02:45 AM
Tibor wrote:I'm sorry to hear that. I can only find another way. thanks !
vanxis wrote:Sorry if I was not clear enough.
I don't know how I need to enter parameters in memo if I want to create a accessory or a juction.
You can add only new frames to an existing curtain wall via API.
Currently there is no way to create new accessories or junctions using the API.