License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…
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