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…
2017-07-20
11:15 AM
- last edited on
2022-12-06
02:03 PM
by
Daniel Kassai
2017-07-20 01:39 PM
DimRad wrote:Hi,
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!
2017-07-20 02:01 PM
2017-07-24 12:58 PM
DimRad wrote:That update hasn't been published yet, sorry.
Oh, it's wonderfull! 'Cause I spend a week reading documentation and debugging code thinking it's my bug.
But here is another question - where can I download latest ArchiCAD 20 update 6529? On International site I see only build 6005 and on Russian localization site 5025.
Thank You in advance!