<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: APIEnv_SetCurrent3DStyleID Error in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271633#M2088</link>
    <description>In the code you posted it seems that some variable names are inconsistent (curStyleName &amp;lt;-&amp;gt; currentStyleName, StyleList &amp;lt;-&amp;gt; stylesNames), but that might be fine depending on the context your code is in.&lt;BR /&gt;
&lt;BR /&gt;
Anyway I also get the same error when running the function "Do_Edit3DStyles" from the API Example "Environment_Control".&lt;BR /&gt;
When debugging it I saw, that it runs into the following assertion:&lt;BR /&gt;

&lt;PRE&gt;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)&lt;/PRE&gt;

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.</description>
    <pubDate>Tue, 01 Jun 2021 12:22:36 GMT</pubDate>
    <dc:creator>BerndSchwarzenbacher</dc:creator>
    <dc:date>2021-06-01T12:22:36Z</dc:date>
    <item>
      <title>APIEnv_SetCurrent3DStyleID Error</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271632#M2087</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I have Error This Source in Debug&lt;BR /&gt;(ArchiCAD 23 API / Windows / Visual Studio 2017 C++/Japanese)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;//----------------------------------------------&lt;BR /&gt;Error Message / Code Stopped&lt;BR /&gt;ハンドルされない例外が0x0007FF8866B4B89(KernalBase.dll)で発生しました&lt;BR /&gt;(ARCHICAD.exe内);&lt;BR /&gt;0xC000041D:ユーザーコールバック中に未処理の例外がはっせいしました。&lt;BR /&gt;&lt;BR /&gt;//----------------------------------------------&lt;BR /&gt;GS::UniString curStyleName;&lt;BR /&gt;GS::Array &amp;lt;GS::UniString&amp;gt; StyleList;&lt;BR /&gt;GSErrCode err = ACAPI_Environment(&lt;BR /&gt;APIEnv_Get3DStyleListID&lt;BR /&gt;, &amp;amp;stylesNames&lt;BR /&gt;, &amp;amp;currentStyleName&lt;BR /&gt;);&lt;BR /&gt;if(err==NoError){&lt;BR /&gt;GS::UniString u = StyleList[0];&lt;BR /&gt;err = ACAPI_Environment(&lt;BR /&gt;APIEnv_SetCurrent3DStyleID&lt;BR /&gt;, &amp;amp;u&lt;BR /&gt;);&lt;BR /&gt;}&lt;BR /&gt;//----------------------------------------------&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:36:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271632#M2087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-14T07:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: APIEnv_SetCurrent3DStyleID Error</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271633#M2088</link>
      <description>In the code you posted it seems that some variable names are inconsistent (curStyleName &amp;lt;-&amp;gt; currentStyleName, StyleList &amp;lt;-&amp;gt; stylesNames), but that might be fine depending on the context your code is in.&lt;BR /&gt;
&lt;BR /&gt;
Anyway I also get the same error when running the function "Do_Edit3DStyles" from the API Example "Environment_Control".&lt;BR /&gt;
When debugging it I saw, that it runs into the following assertion:&lt;BR /&gt;

&lt;PRE&gt;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)&lt;/PRE&gt;

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.</description>
      <pubDate>Tue, 01 Jun 2021 12:22:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271633#M2088</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2021-06-01T12:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: APIEnv_SetCurrent3DStyleID Error</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271634#M2089</link>
      <description>Thank You Your Answer.&lt;BR /&gt;
Sorry, I missed My Variable Names in C++ Source.&lt;BR /&gt;
But This Error is not caused by Variable Names.&lt;BR /&gt;
&lt;BR /&gt;
I'm hoping in order to evade this error by your report.</description>
      <pubDate>Thu, 03 Jun 2021 01:57:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/APIEnv-SetCurrent3DStyleID-Error/m-p/271634#M2089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-03T01:57:22Z</dc:date>
    </item>
  </channel>
</rss>

