<?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: API : HotlinkNode Element and database in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141430#M6505</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
not any error is returned, that's why I really don't know what is missing.</description>
    <pubDate>Thu, 18 Dec 2008 08:03:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-12-18T08:03:16Z</dc:date>
    <item>
      <title>API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141428#M6503</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;i'm trying since last month to write a plugin which load an external Hotlinked Module and place it on the project.&lt;BR /&gt;&lt;BR /&gt;I'm near the end , i'v loaded the module, assigned it to an element but i don't succeed to place it on the project.&lt;BR /&gt;&lt;BR /&gt;Here is my little fonction :
&lt;PRE&gt;API_HotlinkNode myAPI_HotlinkNode;
	GSErrCode err;
	IO::Location  location("c:\\test.MOD");
	API_Guid myAPI_HotlinkNodeGuid;
	API_Element element;
	API_ElementMemo memo;

/***************************************************************************************************/
/******************************REMPLISSAGE DE LA STRUCTURE******************************************/
/***************************************************************************************************/
	BNZeroMemory (&amp;amp;myAPI_HotlinkNode, sizeof (API_HotlinkNode));

	//Charge le module en mode unique (define single story mode)
	myAPI_HotlinkNode.storyRangeType = APIHotlink_SingleStory;
	//Precise les que les extensions possibles sont :.pln, .mod, .plp or .2dl file. (define file type)
	myAPI_HotlinkNode.type = APIHotlink_Module;
	//Définie le fichier à charger (define file to load)
	myAPI_HotlinkNode.sourceLocation = &amp;amp;location;
	//definie l'étage comme étant l'étage -2
	myAPI_HotlinkNode.refFloorInd = -2;

	CHANSI2Unicode ("Module 1", GS::CStringLen, myAPI_HotlinkNode.name,API_UniLongNameLen, CC_Default, NULL);      

/***************************************************************************************************/
/******************************FIN REMPLISSAGE DE LA STRUCTURE**************************************/
/***************************************************************************************************/

/********************CREATION DU GUID*************************************/
	err = ACAPI_Database (APIDb_CreateHotlinkNodeID,&amp;amp;myAPI_HotlinkNode,NULL,NULL);
	if (err != NoError) {
			afficheMessage("HotlinkNode parameter is NULL or sourceLocation is NULL or invalid",err);
			return err;
		}
/*************************************************************************/
	myAPI_HotlinkNodeGuid = myAPI_HotlinkNode.guid;


/********************MISE A JOUR DU CACHE*********************************/
	err = ACAPI_Database (APIDb_UpdateHotlinkCacheID,&amp;amp;myAPI_HotlinkNodeGuid,NULL,NULL);
	
	if (err != NoError) {
			switch(err)
			{
			case APIERR_BADPARS:
								afficheMessage("hotlinkNodeGuid parameter is NULL",err);
								break;
			case APIERR_BADID:
								afficheMessage("hotlinkNodeGuid is invalid",err);
								break;
			default:
					afficheMessage("APIDb_UpdateHotlinkCacheID",err);
					break;
				
			}
			return err;
		}
/*************************************************************************/
/******************PLACE LE MODULE LIE DANS LA DATABASE*******************/

err = ACAPI_OpenUndoableSession ("Place le module");
if (err == NoError) 
{
	BNZeroMemory (&amp;amp;element, sizeof (API_Element));		
	element.header.typeID = API_HotlinkID ;
	element.header.index = 1;
	err = ACAPI_Element_GetDefaults (&amp;amp;element, &amp;amp;memo);
	if (err == NoError) 
	{
		element.hotlink.type = APIHotlink_Module;
		element.hotlink.hotlinkNodeGuid = myAPI_HotlinkNodeGuid;
		err = ACAPI_Element_Create(&amp;amp;element, &amp;amp;memo);
		if (err != NoError)
		{
			switch(err)
			{
				case APIERR_BADPARS:
									afficheMessage("The passed parameter is NULL; element",err);
									break;
				case APIERR_BADID:
									afficheMessage("The element type is invalid, or the element type is not supported by the server application",err);
									break;
				case APIERR_BADDATABASE:
									afficheMessage("The current database is not proper for the operation",err);
									break;
				case APIERR_REFUSEDPAR:
									afficheMessage("The element-&amp;gt;header.typeID parameter was incorrect. It might happen if you want to create something in a window not capable to display it, for example a wall in a section window. ",err);
									break;
				case APIERR_NOTMINE:
									afficheMessage("The element was attempted to be created on a layer owned by someone else. Most likely to occur when working on documents in teamwork mode. ",err);
									break;
				case APIERR_LOCKEDLAY:
									afficheMessage("The element attempted to be created was on a locked layer",err);
									break;
				case APIERR_HIDDENLAY:
									afficheMessage("The element attempted to be created was on a hidden layer.",err);
									break;
				case APIERR_INVALFLOOR:
									afficheMessage("The element-&amp;gt;header.floorInd parameter is out of range.",err);
									break;
				case APIERR_REFUSEDCMD:
									afficheMessage("The passed identifier is not subject to the operation.",err);
									break;
				default:
						afficheMessage("ACAPI_Element_Create",err);
						break;
			}
			return err;
		}
		err = ACAPI_Database (APIDb_RedrawCurrentDatabaseID,NULL,NULL,NULL);
		if (err != NoError)
			afficheMessage("APIDb_RedrawCurrentDatabaseID",err);
		ACAPI_DisposeElemMemoHdls (&amp;amp;memo);
	}
	else
		afficheMessage("ACAPI_Element_GetDefaults",err);
	
	ACAPI_CloseUndoableSession();
}
else
	afficheMessage("ACAPI_OpenUndoableSession",err);

&lt;/PRE&gt;
if someone would know the thing i forgot to do, thank you in advance for your help.&lt;/DIV&gt;</description>
      <pubDate>Fri, 04 Aug 2023 12:49:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141428#M6503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-04T12:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141429#M6504</link>
      <description>&lt;BLOCKQUOTE&gt;atila-diffusion wrote:&lt;BR /&gt;Hello,&lt;BR /&gt;
i'm trying since last month to write a plugin which load an external Hotlinked Module and place it on the project.&lt;BR /&gt;
I'm near the end , i'v loaded the module, assigned it to an element but i don't succeed to place it on the project.
&lt;/BLOCKQUOTE&gt;
Is an error returned at any point in this function? If so, where, and which error code?</description>
      <pubDate>Thu, 18 Dec 2008 00:22:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141429#M6504</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2008-12-18T00:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141430#M6505</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
not any error is returned, that's why I really don't know what is missing.</description>
      <pubDate>Thu, 18 Dec 2008 08:03:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141430#M6505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-18T08:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141431#M6506</link>
      <description>&lt;BLOCKQUOTE&gt;atila-diffusion wrote:&lt;BR /&gt;not any error is returned, that's why I really don't know what is missing.&lt;/BLOCKQUOTE&gt;
Check the easy things first - have you checked the storey (floor) and layer applied? And what does the transformation matrix contain?</description>
      <pubDate>Thu, 18 Dec 2008 09:45:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141431#M6506</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2008-12-18T09:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141432#M6507</link>
      <description>I allready checked the floor, but i do not filled the transformation matrix, I thought it was not needed.&lt;BR /&gt;
&lt;BR /&gt;
Do I have to fill it like this : &lt;BR /&gt;

&lt;PRE&gt;element.hotlink.transformation.tmx[3] = 10;
			element.hotlink.transformation.tmx[7] = 4;
			double	co = cos (0.52359877556);
			double	si = sin (0.52359877556);
			element.hotlink.transformation.tmx[0] = element.hotlink.transformation.tmx[5] = co;
			element.hotlink.transformation.tmx[1] = -si;
			element.hotlink.transformation.tmx[4] = si;&lt;/PRE&gt;

about the layer is it this : &lt;BR /&gt;

&lt;PRE&gt;element.header.layer = 1;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Dec 2008 10:28:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141432#M6507</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-18T10:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141433#M6508</link>
      <description>THANK YOU VERY MUCH .&lt;BR /&gt;
&lt;BR /&gt;
It works thanks to you, had to fill the layer.&lt;BR /&gt;
&lt;BR /&gt;
I thank you very much.</description>
      <pubDate>Thu, 18 Dec 2008 10:35:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141433#M6508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-18T10:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141434#M6509</link>
      <description>Do you know if we have to ask for a validation to graphisoft before to sell a plugin, or to do something else?</description>
      <pubDate>Thu, 18 Dec 2008 11:15:08 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141434#M6509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-18T11:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141435#M6510</link>
      <description>&lt;BLOCKQUOTE&gt;atila-diffusion wrote:&lt;BR /&gt;Do you know if we have to ask for a validation to graphisoft before to sell a plugin, or to do something else?&lt;/BLOCKQUOTE&gt;
Yes, you need a developer ID from Graphisoft to enable the add-on to work with the commercial version of ArchiCAD. Take a look at the information here: &lt;A href="http://www.graphisoft.com/support/developer/policy/index.html" target="_blank"&gt;&lt;/A&gt;&lt;S&gt;&lt;A href="http://www.graphisoft.com/support/developer/policy/index.html" target="_blank"&gt;&lt;/A&gt;&lt;A href="&amp;lt;/s&amp;gt;&amp;lt;LINK_TEXT text=&amp;quot;http://www.graphisoft.com/support/devel ... index.html&amp;quot;&amp;gt;http://www.graphisoft.com/support/developer/policy/index.html&amp;lt;/LINK_TEXT&amp;gt;&amp;lt;e&amp;gt;"&gt;&lt;/A&gt;&lt;/S&gt;&lt;LINK_TEXT text="http://www.graphisoft.com/support/devel ... index.html"&gt;http://www.graphisoft.com/support/developer/policy/index.html&lt;/LINK_TEXT&gt;&lt;E&gt;&lt;/E&gt;</description>
      <pubDate>Thu, 18 Dec 2008 11:21:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141435#M6510</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2008-12-18T11:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: API : HotlinkNode Element and database</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141436#M6511</link>
      <description>Ok thank you I already asked for an ID. i'm waiting for it.&lt;BR /&gt;
&lt;BR /&gt;
Thank you for all</description>
      <pubDate>Thu, 18 Dec 2008 13:08:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/API-HotlinkNode-Element-and-database/m-p/141436#M6511</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-12-18T13:08:42Z</dc:date>
    </item>
  </channel>
</rss>

