<?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: How to change the value of a label linked to a fixed named optional parameter in the API in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680746#M10648</link>
    <description>&lt;P&gt;Changing the default label settings first worked well.&lt;BR /&gt;Thank you very much, Akos.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Oct 2025 00:12:00 GMT</pubDate>
    <dc:creator>arad</dc:creator>
    <dc:date>2025-10-21T00:12:00Z</dc:date>
    <item>
      <title>How to change the value of a label linked to a fixed named optional parameter in the API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680393#M10636</link>
      <description>&lt;P&gt;I’m trying to modify parameters when creating a label.&lt;BR /&gt;How can I change the value of a symbol label that is linked to a fixed named optional parameter?&lt;BR /&gt;Changing it from the API_LabelType or by modifying the object parameters does not produce the expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="arad_0-1760690596972.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/93289i9A924086F07801F1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="arad_0-1760690596972.png" alt="arad_0-1760690596972.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;GSErrCode SetLabel(API_Element* elem, const GS::UniString&amp;amp; libpartName) {
	GSErrCode err = NoError;

	API_LibPart libpart = {};
	BNZeroMemory(&amp;amp;libpart, sizeof(API_LibPart));

	GS::ucscpy(libpart.docu_UName, libpartName.ToUStr());
	err = ACAPI_LibraryPart_Search(&amp;amp;libpart, false);

	API_ParamOwnerType   paramOwner = {};
	API_ChangeParamType  chgParam = {};
	API_GetParamsType getParams = {};

	paramOwner.libInd = libpart.index;
	err = ACAPI_LibraryPart_OpenParameters(&amp;amp;paramOwner);

	if (err == NoError) {
		err = ACAPI_LibraryPart_GetActParameters(&amp;amp;getParams);

		if (err == NoError) {
			CHCopyC("iReferencePoint", chgParam.name);
			chgParam.realValue = 5;
			err = ACAPI_LibraryPart_ChangeAParameter(&amp;amp;chgParam); //can change parameter

			CHCopyC("AC_TextAlignment_1", chgParam.name);
			chgParam.realValue = 2;
			err = ACAPI_LibraryPart_ChangeAParameter(&amp;amp;chgParam); //cannot change parameter

			if (err == NoError)
				err = ACAPI_LibraryPart_GetActParameters(&amp;amp;getParams);
		}
		ACAPI_LibraryPart_CloseParameters();
	}

	API_Element     label = {};
	API_ElementMemo labelMemo = {};
	BNZeroMemory(&amp;amp;labelMemo, sizeof(API_ElementMemo));

	label.header.type.typeID = API_LabelID;
	label.label.parentType = elem-&amp;gt;header.type.typeID;

	err = ACAPI_Element_GetDefaults(&amp;amp;label, &amp;amp;labelMemo);

	TurnAutoTextFlagOff(); //This function is defined externally.

	labelMemo.params = getParams.params;

	label.label.labelClass = APILblClass_Symbol;
	label.label.parent = elem-&amp;gt;header.guid;
	label.label.u.symbol.libInd = libpart.index;
	label.label.u.symbol.ownerType.typeID = elem-&amp;gt;header.type.typeID;

	label.label.u.text.pen = 36;
	label.label.framed = false;
	label.label.textWay = APIDir_Parallel;
	label.label.textSize = 2.6;
	label.label.hasLeaderLine = false;
	label.label.pen = 36;
	label.label.arrowData.arrowPen = 36;
	label.label.framed = false;
	label.label.createAtDefaultPosition = true;
	label.label.u.text.just = APIJust_Center; //not work

	err = ACAPI_Element_Create(&amp;amp;label, &amp;amp;labelMemo);

	ACAPI_DisposeElemMemoHdls(&amp;amp;labelMemo);

	return err;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 08:57:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680393#M10636</guid>
      <dc:creator>arad</dc:creator>
      <dc:date>2025-10-17T08:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the value of a label linked to a fixed named optional parameter in the API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680419#M10638</link>
      <description>&lt;P&gt;Hi Arad,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;AC_ parameters cannot be changed from the API, as they are controlled directly from Archicad (see the GDL reference guide, section "Parameters for Text Handling").&lt;/P&gt;
&lt;P&gt;It seems that the API currently ignores the text settings when you create a symbol label. So, my idea is to set the default parameters for a text label (including justification), then create the symbol label. (and set the defaults back if needed)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 12:05:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680419#M10638</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2025-10-17T12:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the value of a label linked to a fixed named optional parameter in the API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680746#M10648</link>
      <description>&lt;P&gt;Changing the default label settings first worked well.&lt;BR /&gt;Thank you very much, Akos.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2025 00:12:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-change-the-value-of-a-label-linked-to-a-fixed-named/m-p/680746#M10648</guid>
      <dc:creator>arad</dc:creator>
      <dc:date>2025-10-21T00:12:00Z</dc:date>
    </item>
  </channel>
</rss>

