The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, gkmethy, Ed Brown, Mihály Palenik, Tibor Lorántfy, rmasaki, MOREH Tamas, Akos Somorjai

#303319
Hi.
I use APIDb_ModifyHotlinkNodeID to modify hotlinknode name,but it does not work.

In the HotLink Module Manager ,the hotlink name is also the old name.

the code e.g:
Code: Select all
GS::snuprintf(hotlinkNode.name, API_UniLongNameLen - 1, L("Hotlink updated by test add-on"));
			
			
			err = ACAPI_Database (APIDb_ModifyHotlinkNodeID, &hotlinkNode);		// rename hotlink node
			if (err == NoError && hotlinkNode.guid != APINULLGuid)				// update cache content
				err = ACAPI_Database (APIDb_UpdateHotlinkCacheID, const_cast<API_Guid*> (&hotlinkNode.guid));

			if (err == NoError) {
				char guidStr[64];
				APIGuid2GSGuid (hotlinkNode.guid).ConvertToString (guidStr);
				WriteReport ("Hotlink node is updated successfully: {%s}", guidStr);
			}