Author:Akos Somorjai
Posted: Thu Jul 20, 2017 12:39 pm (GMT+1)
Hi,
This is not your fault; it's a bug has been fixed in ARCHICAD 20 build 6529, and in ARCHICAD 21 build 3513.
Best, Akos
Posted: Thu Jul 20, 2017 12:39 pm (GMT+1)
DimRad wrote: |
Hello dear ArchiCAD developers! Recently have problem with ACAPI_Element_SolidOperation_Create() function in my add-on and ElementTest: Solid Operations example. I try to intersect 2 morphs that created by user from main ArchiCAD thread (creation without API). Function throw error -2130313215 APIERR_GENERAL: General error code. Both 2 Morph elements haven't changes (they exist in initial view) after that command. Post code below: GSErrCode clRDArchiM::RD_SolidOperation () { GS::GSErrCode err_local = GS::NoError; // Init Error code API_ElemTypeID typeID; API_Guid guid_Target, guid_Operator; GS::Array<API_Guid> guid_Results; if (!ClickAnElem ("Click on a solid operation target", API_MorphID, NULL, &typeID, &guid_Target)) { WriteReport_Alert ("No element was clicked."); return err_local; } if (!ClickAnElem ("Click on a solid operator element", API_MorphID, NULL, &typeID, &guid_Operator)) { WriteReport_Alert ("No element was clicked."); return err_local; } err_local = ACAPI_CallUndoableCommand ("Solid Operation intersection",[&] () -> GSErrCode { return ACAPI_Element_SolidOperation_Create(guid_Target, guid_Operator, APISolid_Intersect, &guid_Results); }); if (err_local != NoError) { if (err_local == APIERR_NO3D) WriteReport_Alert ("Solid operation targets and operators can be freeshape elements only."); else WriteReport_Alert ("ACAPI_Element_SolidOperation_Create failed: %d", err_local); } return err_local; }; Please help me in this problem. Thank You! |
Hi,
This is not your fault; it's a bug has been fixed in ARCHICAD 20 build 6529, and in ARCHICAD 21 build 3513.
Best, Akos