<?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: Performing object manipulation automatically when saving in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/603640#M9363</link>
    <description>&lt;P&gt;Have you been able to debug into the add-on? If so, where did the crash happen and what was the stack trace leading to it?&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 12:00:36 GMT</pubDate>
    <dc:creator>Ralph Wessel</dc:creator>
    <dc:date>2024-05-14T12:00:36Z</dc:date>
    <item>
      <title>Performing object manipulation automatically when saving</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/601608#M9308</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been working on trying to change GDL object parameters automatically when the user saves the project file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;static GSErrCode __ACENV_CALL ProjectEventHandlerProc(API_NotifyEventID notifID, Int32 param) {
	switch (notifID) {
	case APINotify_PreSave: {
		ACAPI_CallUndoableCommand("Hide", [&amp;amp;]() -&amp;gt; GSErrCode {
			HideStuff(parameter, 0);
			return NoError; });
		break;
	}
	case APINotify_Save: {
		ACAPI_CallUndoableCommand("Hide", [&amp;amp;]() -&amp;gt; GSErrCode {
			HideStuff(parameter, 1);
			return NoError; });
		break;
	}
	break;
	}
	return NoError;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The object has a parameter to be hidden when the value is False and shown when it's True. Currently the function works fine when called during a PreSave, but ArchiCAD crashes when I try to call it during a Save. Is it possible to call undoable commands during a save function?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, is it possible within the API to just undo the previous command as if a user had clicked undo?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 09:03:49 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/601608#M9308</guid>
      <dc:creator>RobDev</dc:creator>
      <dc:date>2024-09-17T09:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Performing object manipulation automatically when saving</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/603349#M9352</link>
      <description>&lt;P&gt;Hi Rob,&lt;BR /&gt;&lt;BR /&gt;Could you please give us a bug report ID related to this crash?&lt;BR /&gt;&lt;BR /&gt;The definition of the HideStuff function would be helpful. Or the list of the API functions you call inside it.&lt;BR /&gt;The minimum steps to reproduce this crash with a new plan also would be a big help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ákos&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 07:26:54 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/603349#M9352</guid>
      <dc:creator>Akos Nagy</dc:creator>
      <dc:date>2024-05-10T07:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Performing object manipulation automatically when saving</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/603640#M9363</link>
      <description>&lt;P&gt;Have you been able to debug into the add-on? If so, where did the crash happen and what was the stack trace leading to it?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 12:00:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Performing-object-manipulation-automatically-when-saving/m-p/603640#M9363</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2024-05-14T12:00:36Z</dc:date>
    </item>
  </channel>
</rss>

