Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

APIEnv_SetCurrent3DStyleID Error

icon
Newcomer
I have Error This Source in Debug
(ArchiCAD 23 API / Windows / Visual Studio 2017 C++/Japanese)


//----------------------------------------------
Error Message / Code Stopped
ハンドルされない例外が0x0007FF8866B4B89(KernalBase.dll)で発生しました
(ARCHICAD.exe内);
0xC000041D:ユーザーコールバック中に未処理の例外がはっせいしました。

//----------------------------------------------
GS::UniString curStyleName;
GS::Array <GS::UniString> StyleList;
GSErrCode err = ACAPI_Environment(
APIEnv_Get3DStyleListID
, &stylesNames
, &currentStyleName
);
if(err==NoError){
GS::UniString u = StyleList[0];
err = ACAPI_Environment(
APIEnv_SetCurrent3DStyleID
, &u
);
}
//----------------------------------------------
2 REPLIES 2

bschwb
Booster
In the code you posted it seems that some variable names are inconsistent (curStyleName <-> currentStyleName, StyleList <-> stylesNames), but that might be fine depending on the context your code is in.

Anyway I also get the same error when running the function "Do_Edit3DStyles" from the API Example "Environment_Control".
When debugging it I saw, that it runs into the following assertion:
ODB assertion failed at P:\VMWD\Build\Sources\ObjectDatabase\ObjectDatabaseDll\Database\ODBDatabase.cpp 1275
    assert id: A9CF0419-32EB-4DEB-A7EB-73B9F6B82C7F
    description: can't open modification scope inside transaction (modification scope should be the outermost)
I then tried to wrap ACEnv_SetCurrent3DStyleID in ACAPI_CallCommand but that still gives the same error. I filled out a bit more detailed bug report for Graphisoft. In case I hear back from them I'll let you know.
Bernd Schwarzenbacher
Archicad Add-On Developer
AC 24-25, VS 2019

Get free Add-Ons at www.bschwb.com/add-ons

icon
Newcomer
Thank You Your Answer.
Sorry, I missed My Variable Names in C++ Source.
But This Error is not caused by Variable Names.

I'm hoping in order to evade this error by your report.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!