<?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: ACAPI_Automate - OpenID in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218497#M3679</link>
    <description>&lt;BLOCKQUOTE&gt;kzaremba wrote:&lt;BR /&gt;I was thinking about a method that clicks OK or ESC on each appearing UI element. Is it possible with DG library?&lt;/BLOCKQUOTE&gt;
Please check the DGEnableAutoClose/DGDisableAutoClose functions. You can find them in the DG.h header file.&lt;BR /&gt;
If you call DGEnableAutoClose then each dialog will be automatically closed by ARCHICAD.</description>
    <pubDate>Mon, 22 Jul 2019 14:37:01 GMT</pubDate>
    <dc:creator>Tibor Lorantfy</dc:creator>
    <dc:date>2019-07-22T14:37:01Z</dc:date>
    <item>
      <title>ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218492#M3674</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;I started to play around with ACAPI_Automate. But I stuck I very beginning... &lt;BR /&gt;I have two problems: &lt;BR /&gt;Problem 1: When I pass GS::UniString as a parameter in the constructor the part of extension is eaten.&lt;BR /&gt;Problem 2: When I try to Open I got an error: 2130312312 APIERR_REFUSEDCMD&lt;BR /&gt;&lt;BR /&gt;Example code with commented problems based on DoOpen form Automation example:
&lt;PRE&gt;DoOpen() {
	//Based on DO_OPEN form API

		API_FileOpenPars	fop;
		GSErrCode			err;
		BNZeroMemory(&amp;amp;fop, sizeof(API_FileOpenPars));

		fop.fileTypeID = APIFType_PlanFile;
		fop.useStoredLib = true;

		IO::Location appFolderLoc; 
		GSErrCode errorCode = IO::fileSystem.GetSpecialLocation(IO::FileSystem::Desktop, &amp;amp;appFolderLoc);

		GS::UniString myPath = GS::UniString("empty");
		
		IO::Name myName = IO::Name(Name);  // Name pased in Constructor from GS::UniString
		myName.AppendExtension("pln");//Problem 1: Need to apend because passed name is up to dot for example  test.pln -&amp;gt; test 

		fop.file = new IO::Location(appFolderLoc, myName);

		err = ACAPI_Automate(APIDo_OpenID, &amp;amp;fop);  // Problem 2: returns error :APIERR_REFUSEDCMD	-2130312312	81060388	The passed identifier is not subject to the operation.

		if (err != NoError)
			ACAPI_WriteReport("Error in APIDo_OpenID:", true);


		delete fop.file;

	return;
	}		// Do_Open&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 05 Oct 2022 11:27:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218492#M3674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-05T11:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218493#M3675</link>
      <description>I have managed to fix the path problem - wrongly passed attributes. &lt;BR /&gt;
&lt;BR /&gt;
However, the error is still the same. The weird thing is that when I use example form Automate_Functions it's working on demo mode. However, when I use an identical approach in my registered addon it dosent work and the error appears anyway.</description>
      <pubDate>Fri, 26 Apr 2019 09:41:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218493#M3675</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-26T09:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218494#M3676</link>
      <description>APIERR_REFUSEDCMD error code can be returned because of the following reasons in case of APIDo_OpenID:
&lt;UL&gt;&lt;LI&gt;&lt;S&gt;&lt;/S&gt;&lt;/LI&gt;&lt;LI&gt;You use this code inside an undoable scope (ACAPI_CallUndoableCommand).&lt;/LI&gt;
&lt;LI&gt;&lt;S&gt;&lt;/S&gt;&lt;/LI&gt;&lt;LI&gt;You executed this code inside a notification handler function (ACAPI_Notify_CatchProjectEvent).&lt;/LI&gt;&lt;/UL&gt;

Maybe there could be more reasons, but I hope you are facing one of these &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;  If not, then I will keep thinking...</description>
      <pubDate>Fri, 26 Apr 2019 13:55:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218494#M3676</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2019-04-26T13:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218495#M3677</link>
      <description>&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;
You use this code inside an undoable scope (ACAPI_CallUndoableCommand).
&lt;/BLOCKQUOTE&gt;

This was my case. I didn't realize that I was using menu registration form Properties example and there are actually called as undoable commands. Thanks a lot now it's 'working.</description>
      <pubDate>Sat, 27 Apr 2019 08:52:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218495#M3677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-27T08:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218496#M3678</link>
      <description>I was wondering recently is there any way in AC 22 to suspend or click OK on UI elements popping up during file opening. &lt;BR /&gt;
I would like to open the file without being disturbed a least with the Library Manager, Drawing manager, Midding Addon Info and Hotlink Manager - as far as I observed those menus break opening procedure. &lt;BR /&gt;
&lt;BR /&gt;
I found useStoredLib and libGiven properties in API_​FileOpenPars. But it feels like it doesn't mean to control UI only opening procedure itself. &lt;BR /&gt;
If there is no way of modyfing the opening procedure. I was thinking about a method that clicks OK or ESC on each appearing UI element. Is it possible with DG library?&lt;BR /&gt;
&lt;BR /&gt;
I'm aware that things will change in AC23 on startup but I'm looking for a working solution for today. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
      <pubDate>Mon, 22 Jul 2019 13:42:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218496#M3678</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-22T13:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218497#M3679</link>
      <description>&lt;BLOCKQUOTE&gt;kzaremba wrote:&lt;BR /&gt;I was thinking about a method that clicks OK or ESC on each appearing UI element. Is it possible with DG library?&lt;/BLOCKQUOTE&gt;
Please check the DGEnableAutoClose/DGDisableAutoClose functions. You can find them in the DG.h header file.&lt;BR /&gt;
If you call DGEnableAutoClose then each dialog will be automatically closed by ARCHICAD.</description>
      <pubDate>Mon, 22 Jul 2019 14:37:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218497#M3679</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2019-07-22T14:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: ACAPI_Automate - OpenID</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218498#M3680</link>
      <description>&lt;BLOCKQUOTE&gt;Tibor wrote:&lt;BR /&gt;
If you call DGEnableAutoClose then each dialog will be automatically closed by ARCHICAD.
&lt;/BLOCKQUOTE&gt;

Thanks a lot for suggestion Tibor. It works perfectly and its only one line of code to make it work.. Cool &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_biggrin.gif" style="display : inline;" /&gt;</description>
      <pubDate>Tue, 23 Jul 2019 07:03:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/ACAPI-Automate-OpenID/m-p/218498#M3680</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-23T07:03:46Z</dc:date>
    </item>
  </channel>
</rss>

