2018-08-14 04:57 PM - last edited on 2022-11-30 10:52 AM by Daniel Kassai
Solved! Go to Solution.
2018-08-15 11:25 AM
static USize GetNumberOfGroups () { GS::HashSet<API_Guid> groups; GSErrCode err = NoError; GS::Array<API_Guid> allElements; ACAPI_Element_GetElemList (API_ZombieElemID, &allElements); for (const API_Guid& guid : allElements) { API_Elem_Head head = {}; head.guid = guid; err = ACAPI_Element_GetHeader (&head, APIElemMask_FromFloorplan); if (err != NoError) continue; if (head.groupGuid != APINULLGuid) groups.Add (head.groupGuid); } return groups.GetSize (); } static USize GetNumberOfSolidLinks () { USize numberOfSolidLinks = 0; GSErrCode err = NoError; GS::Array<API_Guid> allElements; ACAPI_Element_GetElemList (API_ZombieElemID, &allElements); for (const API_Guid& guid : allElements) { API_Guid** guid_Operators = nullptr; Int32 nLinks; err = ACAPI_Element_SolidLink_GetOperators (guid, &guid_Operators, &nLinks); BMhFree (reinterpret_cast<GSHandle> (guid_Operators)); if (err != NoError) continue; numberOfSolidLinks += nLinks; } return numberOfSolidLinks; }I'm not sure this does exactly what you want, but if you need any further help, feel free to ask!
2018-08-14 05:18 PM
2018-08-15 11:25 AM
static USize GetNumberOfGroups () { GS::HashSet<API_Guid> groups; GSErrCode err = NoError; GS::Array<API_Guid> allElements; ACAPI_Element_GetElemList (API_ZombieElemID, &allElements); for (const API_Guid& guid : allElements) { API_Elem_Head head = {}; head.guid = guid; err = ACAPI_Element_GetHeader (&head, APIElemMask_FromFloorplan); if (err != NoError) continue; if (head.groupGuid != APINULLGuid) groups.Add (head.groupGuid); } return groups.GetSize (); } static USize GetNumberOfSolidLinks () { USize numberOfSolidLinks = 0; GSErrCode err = NoError; GS::Array<API_Guid> allElements; ACAPI_Element_GetElemList (API_ZombieElemID, &allElements); for (const API_Guid& guid : allElements) { API_Guid** guid_Operators = nullptr; Int32 nLinks; err = ACAPI_Element_SolidLink_GetOperators (guid, &guid_Operators, &nLinks); BMhFree (reinterpret_cast<GSHandle> (guid_Operators)); if (err != NoError) continue; numberOfSolidLinks += nLinks; } return numberOfSolidLinks; }I'm not sure this does exactly what you want, but if you need any further help, feel free to ask!
2018-08-15 02:06 PM
2018-08-15 02:50 PM
2018-08-15 02:59 PM
2018-08-15 03:12 PM
2018-08-15 03:16 PM
2018-08-16 12:03 PM
2018-08-16 12:24 PM
JGoode wrote:As I said, we have many useful blog posts on our site. For example the following post is a step-by-step guide to create an Add-On:
I've spent most of yesterday evening trying to figure it out in terms of the process of creating an add-on and I can't find much information other than people saying if you don't know how then don't try which is obviously not very useful! Even a vague step by step would be useful as I'd be able to research it myself but I can't even seem to find that! The addon would be incredibly useful but it's not looking very promising