<?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: Is there a way to make a loading progress bar in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250190#M5475</link>
    <description>Thank you for the help. I use second one!</description>
    <pubDate>Thu, 19 Mar 2015 13:15:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-19T13:15:34Z</dc:date>
    <item>
      <title>[SOLVED] Is there a way to make a loading progress bar</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250188#M5473</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I would like to know is there a way to make a loading progress bar by AC API.&lt;BR /&gt;I'm getting information from web service and somethimes it's take 10 second or more so I want to show loading process.&lt;BR /&gt;If there is not a solution by AC API then is it right to do it by third party library, for example by BOOST ?&lt;BR /&gt;&lt;BR /&gt;Please give me an advice.&lt;/DIV&gt;</description>
      <pubDate>Tue, 01 Aug 2023 11:36:25 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250188#M5473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-01T11:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make a loading progress bar</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250189#M5474</link>
      <description>Hi, &lt;BR /&gt;
 &lt;BR /&gt;
yes, AC API provides two options to make progressbar: &lt;BR /&gt;
 &lt;BR /&gt;
1) You can use DG:&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://community.graphisoft.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rogressBar class (defined in DGBarControl.hpp). &lt;BR /&gt;
- first define the progressbar in your GRC resource file: 
&lt;PRE&gt;'GDLG'  32500  Modal | noGrow      0    0  312  195  "Dialog with ProgressBar" { 
//... 
/* [  6] */ ProgressBar			   13  140  286   15	/*minValue:*/ 0  /*maxValue:*/ 100  ClientEdge 
//... 
}&lt;/PRE&gt; &lt;BR /&gt;
- add DG:&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://community.graphisoft.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rogressBar to your dialog class: 
&lt;PRE&gt;class MyDialog : public DG::ModalDialog 
{ 
private: 
		// friend classes 
	friend class	MyObserver; 
 
private: 
	//... 
	DG:&lt;img id="smileytongue" class="emoticon emoticon-smileytongue" src="https://community.graphisoft.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;rogressBar		m_progressBar; 
	//... 
 
public: 
	MyDialog (GSResModule dialResModule, short resId, GSResModule dialIconResModule); 
   ~MyDialog (); 
};&lt;/PRE&gt; &lt;BR /&gt;
- in the constructor of your dialog don't forget to initialize the progressbar: 
&lt;PRE&gt;MyDialog::MyDialog (GSResModule dialResModule, short resId, GSResModule dialIconResModule): 
	DG::ModalDialog		(dialResModule, resId, dialIconResModule), 
	m_progressBar	(GetReference (), 6), 
	//... 
{ 
}&lt;/PRE&gt; &lt;BR /&gt;
- now you can use the initialized progressbar in you code the following way: 
&lt;PRE&gt;m_progressBar.SetValue (&amp;lt;new value between minValue and maxValue&amp;gt;);&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
2) You can use the ACAPI_Interface ProcessWindow methodgroup to show a processwindow with a progressbar. 
&lt;PRE&gt;// Init processwindow: 
	short nPhase	= 1; 
	Int32 maxValue	= 100; 
	ACAPI_Interface (APIIo_InitProcessWindowID, "&amp;lt;progressTitle&amp;gt;", &amp;amp;nPhase); // you can define more phases also 
// Start progressbar: 
	ACAPI_Interface (APIIo_SetNextProcessPhaseID, "&amp;lt;progressSubtitle&amp;gt;", &amp;amp;maxValue); 
// Update progressbar with new value: 
	Int32 progress = 0; 
	ACAPI_Interface (APIIo_SetProcessValueID, &amp;amp;progress, NULL); 
	progress++; 
	ACAPI_Interface (APIIo_SetProcessValueID, &amp;amp;progress, NULL); 
// Processwindow contains a Cancel button also: 
	if (ACAPI_Interface (APIIo_IsProcessCanceledID, NULL, NULL)) { 
		// user cancelled the process! 
	}&lt;/PRE&gt; &lt;BR /&gt;
- This is much more easier. &lt;BR /&gt;
 &lt;BR /&gt;
Regards, &lt;BR /&gt;
Tibor</description>
      <pubDate>Thu, 05 Mar 2015 09:21:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250189#M5474</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2015-03-05T09:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to make a loading progress bar</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250190#M5475</link>
      <description>Thank you for the help. I use second one!</description>
      <pubDate>Thu, 19 Mar 2015 13:15:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/SOLVED-Is-there-a-way-to-make-a-loading-progress-bar/m-p/250190#M5475</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-19T13:15:34Z</dc:date>
    </item>
  </channel>
</rss>

