<?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: Possible to add property definitions on project open/new? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243848#M3844</link>
    <description>I'm not certain whether this operation is supported during that notification, but there is an alternative solution. Take a look at the documentation for &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Command_CallFromEventLoop&lt;E&gt;&lt;/E&gt;. Use this function to instruct ARCHICAD to call your add-on at a point when it is suitable to handle functions that might otherwise be context-sensitive. There is example code with the documentation.</description>
    <pubDate>Tue, 30 Jul 2019 22:40:32 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2019-07-30T22:40:32Z</dc:date>
    <item>
      <title>Possible to add property definitions on project open/new?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243846#M3842</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi again,&lt;BR /&gt;&lt;BR /&gt;Curious as to if I can create a few new property definitions from a project event, so all projects with the add-on will have these new properties to have their values set later on elements.&lt;BR /&gt;&lt;BR /&gt;It seems the only hangup is that
&lt;PRE&gt;ACAPI_Property_CreatePropertyDefinition()&lt;/PRE&gt;
needs undoable scope, but calling that command via CallUndoableCommand from any of the project events (ACAPI_Notify_CatchProjectEvent) causes a crash. &lt;BR /&gt;&lt;BR /&gt;I assume this is explained here in the docs of CallUndoableCommand :
&lt;BLOCKQUOTE&gt;Add-ons may not call this function from their element database event handler callback, because those notifications are sent from within an existing database transaction."&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;&lt;BR /&gt;Does this mean that its impossible to create properties from callbacks of project events? I have no issues creating properties from a CatchNewElement callback...&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Tue, 04 Oct 2022 14:25:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243846#M3842</guid>
      <dc:creator>cfranklin</dc:creator>
      <dc:date>2022-10-04T14:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add property definitions on project open/new?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243847#M3843</link>
      <description>One other thing... Its strange that this causes a crash but creating a property group does not. I can successfully create a property group from a project open event just fine.</description>
      <pubDate>Mon, 29 Jul 2019 21:47:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243847#M3843</guid>
      <dc:creator>cfranklin</dc:creator>
      <dc:date>2019-07-29T21:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add property definitions on project open/new?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243848#M3844</link>
      <description>I'm not certain whether this operation is supported during that notification, but there is an alternative solution. Take a look at the documentation for &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;ACAPI_Command_CallFromEventLoop&lt;E&gt;&lt;/E&gt;. Use this function to instruct ARCHICAD to call your add-on at a point when it is suitable to handle functions that might otherwise be context-sensitive. There is example code with the documentation.</description>
      <pubDate>Tue, 30 Jul 2019 22:40:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243848#M3844</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2019-07-30T22:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to add property definitions on project open/new?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243849#M3845</link>
      <description>Thanks! Really appreciate the help, seems I miss things in the docs all the time...</description>
      <pubDate>Wed, 31 Jul 2019 14:14:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Possible-to-add-property-definitions-on-project-open-new/m-p/243849#M3845</guid>
      <dc:creator>cfranklin</dc:creator>
      <dc:date>2019-07-31T14:14:06Z</dc:date>
    </item>
  </channel>
</rss>

