We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2014-07-01 01:53 PM - last edited on 2023-08-01 02:28 PM by Doreena Deng
2014-07-01 03:57 PM
GSErrCode err; GS::Array<API_Guid> circleList; // Get all circles err = ACAPI_Element_GetElemList (API_CircleID, &circleList); if (err != NoError) { ErrorBeep ("ACAPI_Element_GetElemList ()", err); return; } WriteReport ("Number of total circles: %u", (GS::UIntForStdio) circleList.GetSize ()); // Enumerate circles for (GS::Array<API_Guid>::ConstIterator it = circleList.Enumerate (); it != NULL; ++it) { API_Element element; BNZeroMemory (&element, sizeof (API_Element)); element.header.typeID = API_CircleID; element.header.guid = *it; // Get informations about the circle err = ACAPI_Element_Get (&element); if (err != NoError) { ErrorBeep ("ACAPI_Element_Get ()", err); return; } WriteReport ("Circle center point: (%.2f,%.2f)", /* !!! use .arc instead of .circle !!!*/ element.arc.origC.x, element.arc.origC.y); WriteReport ("Circle radius: %.2f", /* !!! use .arc instead of .circle !!!*/ element.arc.r); }
2014-07-01 04:03 PM