<?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: [SOLVED] Opening text file into add-on in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283451#M5177</link>
    <description>I have another question and I don't want to open a new thread for it. For debugging purposes I want to log some data.  I'm opening the report window from File &amp;gt; Info &amp;gt; Session Report. Is this the right way to open it?&lt;BR /&gt;
&lt;BR /&gt;
Also I'm using &lt;B&gt;WriteReport_Alert&lt;/B&gt;() method, but I only get the popup, without logging the data into the report window of archicad. I am using the demo version of Archicad, so is it possible that &lt;B&gt;ACAPI_WriteReport&lt;/B&gt;() doesn't work with the demo version of archicad and doesn't want to write to that file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance, Julian</description>
    <pubDate>Mon, 15 May 2017 09:41:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-15T09:41:50Z</dc:date>
    <item>
      <title>[SOLVED] Opening text file into add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283448#M5174</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi everybody!&lt;BR /&gt;&lt;BR /&gt;I am new to archicad and C++. I am developing the add-on on x-code 8.3.2. The add-on is for my company, which will import materials and build ups from text file. Now I have a struggle and I can't find any method in the API for opening simple file dialog. The closest thing I find is APIIo_​OpenPictureDialogID, but it doesn't suite my needs. Am I missing something here?&lt;BR /&gt;&lt;BR /&gt;All the best, Julian&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Jul 2023 18:47:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283448#M5174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-12T18:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Opening text file into add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283449#M5175</link>
      <description>Hi Julian, &lt;BR /&gt;
 
&lt;PRE&gt;static bool	GetOpenFile (IO::Location*	dloc, const char* fileExtensions, const GS::UniString&amp;amp; filterText) 
{ 
	if (dloc == nullptr) 
		return false; 
 
	FTM::TypeID	retID; 
	FTM::FileTypeManager	ftman ("MyManager"); 
	FTM::FileType			type (nullptr, fileExtensions, 0, 0, 0); 
	FTM::TypeID				id = FTM::FileTypeManager::SearchForType (type); 
	if (id == FTM::UnknownType) 
		id = ftman.AddType (type); 
 
	DG::FileDialog	dlg (DG::FileDialog::OpenFile);						// Open only 1 file 
	UIndex	i = dlg.AddFilter (id, DG::FileDialog::DisplayExtensions); 
	dlg.SetFilterText (i, filterText); 
 
	if (!dlg.Invoke ()) 
		return false; 
 
	*dloc = dlg.GetSelectedFile (); 
	return true; 
} 
 
// ----------------------------------------------------------------------------- 
// Usage: 
IO::Location selectedTextFileLoc; 
if (!GetOpenFile (&amp;amp;selectedTextFileLoc, "Text File", "*.txt")) 
	return;&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
This simple GetOpenFile function opens a file dialog for you. &lt;BR /&gt;
 &lt;BR /&gt;
Regards, &lt;BR /&gt;
Tibor</description>
      <pubDate>Fri, 12 May 2017 15:48:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283449#M5175</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2017-05-12T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Opening text file into add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283450#M5176</link>
      <description>Hey Tibor,&lt;BR /&gt;
&lt;BR /&gt;
Thank you very much !!</description>
      <pubDate>Mon, 15 May 2017 08:02:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283450#M5176</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-15T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] Opening text file into add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283451#M5177</link>
      <description>I have another question and I don't want to open a new thread for it. For debugging purposes I want to log some data.  I'm opening the report window from File &amp;gt; Info &amp;gt; Session Report. Is this the right way to open it?&lt;BR /&gt;
&lt;BR /&gt;
Also I'm using &lt;B&gt;WriteReport_Alert&lt;/B&gt;() method, but I only get the popup, without logging the data into the report window of archicad. I am using the demo version of Archicad, so is it possible that &lt;B&gt;ACAPI_WriteReport&lt;/B&gt;() doesn't work with the demo version of archicad and doesn't want to write to that file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance, Julian</description>
      <pubDate>Mon, 15 May 2017 09:41:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283451#M5177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-15T09:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] Opening text file into add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283452#M5178</link>
      <description>&lt;BLOCKQUOTE&gt;jcimentarov wrote:&lt;BR /&gt;I have another question and I don't want to open a new thread for it. For debugging purposes I want to log some data.  I'm opening the report window from File &amp;gt; Info &amp;gt; Session Report. Is this the right way to open it?&lt;BR /&gt;
&lt;BR /&gt;
Also I'm using &lt;B&gt;WriteReport_Alert&lt;/B&gt;() method, but I only get the popup, without logging the data into the report window of archicad. I am using the demo version of Archicad, so is it possible that &lt;B&gt;ACAPI_WriteReport&lt;/B&gt;() doesn't work with the demo version of archicad and doesn't want to write to that file?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance, Julian&lt;/BLOCKQUOTE&gt;

Well, depends on where you want to see the log, I would recommend using a simple DBPrintf () call, which writes to the system.log in Console.&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_WriteReport shouldn't behave differently in the DEMO version, but you can always order a developer license.&lt;BR /&gt;
&lt;BR /&gt;
Best, Akos</description>
      <pubDate>Thu, 18 May 2017 09:40:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283452#M5178</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2017-05-18T09:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: [SOLVED] Opening text file into add-on</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283453#M5179</link>
      <description>A &lt;B&gt;DBPrintf () &lt;/B&gt; call from my add-on doesn't write anything in the system.log ... Is there anything specific that I need to do in order to make it work ?&lt;BR /&gt;
&lt;BR /&gt;
All the best, Julian</description>
      <pubDate>Wed, 24 May 2017 08:17:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Opening-text-file-into-add-on/m-p/283453#M5179</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T08:17:16Z</dc:date>
    </item>
  </channel>
</rss>

