<?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 Modify attributes of my own object in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179891#M6321</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi developers,&lt;BR /&gt;&lt;BR /&gt;I've drawn a new object from my API. Imagine i have defined a new attribute(i.e. angle axe x rotation = inc(in the example picture)) and i would like to modify the field from my API and automatically change this paremeter in the object i have alredy drawn.&lt;BR /&gt;&lt;BR /&gt;Nowadays, i know there is an archiCAD structure where i can modify some object attributes but i can't access to the new ones('inc' in my case). This structure is:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="red"&gt;element.objetct.x&lt;/FONT&gt; where 'x' is the attribute to modify.&lt;BR /&gt;&lt;BR /&gt;I'm in a good way? I'm looking for something like &lt;FONT color="red"&gt;element.object.inc&lt;/FONT&gt;. How can i access to this attribute?&lt;BR /&gt;&lt;BR /&gt;THANKS,&lt;BR /&gt;&lt;BR /&gt;Alex&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sin título.png" style="width: 443px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/9813iBF5B2D9E1664A599/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sin título.png" alt="Sin título.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2023 19:14:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-02T19:14:22Z</dc:date>
    <item>
      <title>Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179891#M6321</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi developers,&lt;BR /&gt;&lt;BR /&gt;I've drawn a new object from my API. Imagine i have defined a new attribute(i.e. angle axe x rotation = inc(in the example picture)) and i would like to modify the field from my API and automatically change this paremeter in the object i have alredy drawn.&lt;BR /&gt;&lt;BR /&gt;Nowadays, i know there is an archiCAD structure where i can modify some object attributes but i can't access to the new ones('inc' in my case). This structure is:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="red"&gt;element.objetct.x&lt;/FONT&gt; where 'x' is the attribute to modify.&lt;BR /&gt;&lt;BR /&gt;I'm in a good way? I'm looking for something like &lt;FONT color="red"&gt;element.object.inc&lt;/FONT&gt;. How can i access to this attribute?&lt;BR /&gt;&lt;BR /&gt;THANKS,&lt;BR /&gt;&lt;BR /&gt;Alex&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sin título.png" style="width: 443px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/9813iBF5B2D9E1664A599/image-size/large?v=v2&amp;amp;px=999" role="button" title="Sin título.png" alt="Sin título.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 19:14:22 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179891#M6321</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T19:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179892#M6322</link>
      <description>&lt;BLOCKQUOTE&gt;frankito5 wrote:&lt;BR /&gt;i would like to modify the field from my API and automatically change this paremeter in the object i have alredy drawn.&lt;/BLOCKQUOTE&gt;
Take a look at the documentation for &lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;APIAny_OpenParametersID&lt;E&gt;&lt;/E&gt;. It includes sample code for modifying a parameter. Although the defaults are changed in this example, the same applies to an object instance.</description>
      <pubDate>Tue, 20 Sep 2011 23:22:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179892#M6322</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-09-20T23:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179893#M6323</link>
      <description>I've tried but unsuccessfully:&lt;BR /&gt;
&lt;BR /&gt;
BNZeroMemory (&amp;amp;paramOwner, sizeof (API_ParamOwnerType)); &lt;BR /&gt;
&lt;FONT color="red"&gt;paramOwner.libInd = 0;&lt;/FONT&gt;	&lt;BR /&gt;
paramOwner.typeID = API_ObjectID;	&lt;BR /&gt;
&lt;FONT color="red"&gt;paramOwner.index = 0;	&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="green"&gt;I suposse libInd and index are 0 due to a default element is defined. In my case, should I change the value? I don't think so because the manual says we have to set it to zero.&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
BNZeroMemory (&amp;amp;getParams, sizeof (API_	GetParamsType));&lt;BR /&gt;
&lt;BR /&gt;
err = ACAPI_Goodies (APIAny_OpenParametersID, &amp;amp;paramOwner, NULL);&lt;BR /&gt;
	&lt;BR /&gt;
if (err == NoError) {&lt;BR /&gt;
	BNZeroMemory (&amp;amp;chgParam, sizeof (API_ChangeParamType));&lt;BR /&gt;
	err = ACAPI_Goodies (APIAny_GetActParametersID, &amp;amp;getParams, NULL);&lt;BR /&gt;
		&lt;BR /&gt;
	if (err == NoError) {&lt;BR /&gt;
		&lt;FONT color="red"&gt;chgParam.index = 0;&lt;/FONT&gt;&lt;BR /&gt;
		&lt;FONT color="red"&gt;CHCopyC("inc",chgParam.name);&lt;/FONT&gt;&lt;BR /&gt;
		chgParam.realValue = 35.0;&lt;BR /&gt;
		err = ACAPI_Goodies (APIAny_ChangeAParameterID, &amp;amp;chgParam, NULL);&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="green"&gt;Here, the index should be 0 again? I'm not pretty sure...&lt;/FONT&gt;&lt;BR /&gt;
&lt;BR /&gt;
		if (err == NoError)&lt;BR /&gt;
			err = ACAPI_Goodies (APIAny_GetActParametersID, &amp;amp;chgParam, NULL);&lt;BR /&gt;
	}&lt;BR /&gt;
	err = ACAPI_Goodies (APIAny_CloseParametersID, NULL, NULL);&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
ACAPI_DisposeAddParHdl (&amp;amp;getParams.params);	&lt;BR /&gt;
err = ACAPI_Element_Create (&amp;amp;element, &amp;amp;memo);&lt;BR /&gt;
ACAPI_DisposeElemMemoHdls(&amp;amp;memo);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have alredy checked all the calls which modify a parameter return the correct expected value so, there is something wrong. I don't know exactly how the system recognizes my object and if it is looking for the parameter i'm trying to modify in the correct library and so on, but when i draw my object from the API, the field 'inc' is still the previous value.</description>
      <pubDate>Thu, 22 Sep 2011 08:36:20 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179893#M6323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-22T08:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179894#M6324</link>
      <description>&lt;BLOCKQUOTE&gt;frankito5 wrote:&lt;BR /&gt;I have alredy checked all the calls which modify a parameter return the correct expected value so, there is something wrong. I don't know exactly how the system recognizes my object and if it is looking for the parameter i'm trying to modify in the correct library and so on, but when i draw my object from the API, the field 'inc' is still the previous value.&lt;/BLOCKQUOTE&gt;
I may have misunderstood your question - do you want to change a parameter in a library part (the file that defines the object) or a parameter of an instance of that object placed in the floor plan?</description>
      <pubDate>Thu, 22 Sep 2011 09:58:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179894#M6324</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-09-22T09:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179895#M6325</link>
      <description>&lt;BLOCKQUOTE&gt;I may have misunderstood your question - do you want to change a parameter in a library part (the file that defines the object) or a parameter of an instance of that object placed in the floor plan?&lt;/BLOCKQUOTE&gt;

I think is the second one. I have created a GDL object and i draw it from an API. In this API i have a dialog where u can set the inclination of this object. When i designed this object i gave it 0º inclination, but what i want is to modify this inclination from the API and draw it directly with the inclination alredy modified. Do you know what i mean?  Thank you for your patience.&lt;BR /&gt;
&lt;BR /&gt;
Alex</description>
      <pubDate>Thu, 22 Sep 2011 10:37:41 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179895#M6325</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-22T10:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179896#M6326</link>
      <description>&lt;BLOCKQUOTE&gt;frankito5 wrote:&lt;BR /&gt;what i want is to modify this inclination from the API and draw it directly with the inclination alredy modified.&lt;/BLOCKQUOTE&gt;
Wouldn't it be the same if you did this in 2 consecutive steps?&lt;UL&gt;&lt;LI&gt;1. Place the object in the floor plan at 0 degrees.&lt;BR /&gt;
&lt;BR /&gt;
2. Open the parameter list for the placed object and modify the inclination parameter as required&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 23 Sep 2011 08:45:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179896#M6326</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2011-09-23T08:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179897#M6327</link>
      <description>What i want is give the inclination from my API, and when i draw my own object(also from my API), draw the object with this inclination alredy set. I will show you in images to be clearer.&lt;BR /&gt;
&lt;BR /&gt;
In first picture u can see the line ROTx inc, where inc is the inclination in the x axe. If i draw this object this parameter is 0º(as you can see in the picture 2). So, what i want is open my API, give a value in an Edit Box and set the new inclination. Next time i draw the object, i want the parameter inc has automatically 45º value(i.e) instead of 0º, without select the object and change the value manually.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I tried how i showed u few many posts before, and i don't know why the system don't change this parameter inc...</description>
      <pubDate>Fri, 23 Sep 2011 10:42:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179897#M6327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-23T10:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179898#M6328</link>
      <description>Task alredy done succesfully! I just modify and change the value in a different function and that's all. I hope this post helps somebody else.&lt;BR /&gt;
&lt;BR /&gt;
Thank you Ralph.</description>
      <pubDate>Mon, 26 Sep 2011 07:28:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179898#M6328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-26T07:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179899#M6329</link>
      <description>It would be nice if you wrote what did you mean by "in a different function"   &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_smile.gif" style="display : inline;" /&gt;   What is that function?&lt;BR /&gt;
&lt;BR /&gt;
I am fighting with the same problem: I placed the object in the floor, as Ralph suggested, and then tried to change the element's parameter "A" using the above example from the API documentation.&lt;BR /&gt;
I only changed these paramOwner's members to the corresponding ones of my element:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;paramOwner.libInd = libPart.index;
paramOwner.guid   = element.header.guid;
&lt;/PRE&gt;

I got error -2130313112 here:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;error = ACAPI_Goodies (APIAny_ChangeAParameterID, &amp;amp;chgParam, nullptr);
&lt;/PRE&gt;

what could be wrong with my parameter?
&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;chgParam.index = 0;
CHCopyC ("А", chgParam.name);
chgParam.realValue = 77.0;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2019 13:48:55 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179899#M6329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-27T13:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Modify attributes of my own object</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179900#M6330</link>
      <description>For the next who will face the same problem - if you want to change the parameters of a placed element, do not use ACAPI_Element_ChangeDefaults, use ACAPI_Element_ChangeParameters instead:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;elemHead = (API_Elem_Head **) BMAllocateHandle (sizeof (API_Elem_Head), ALLOCATE_CLEAR, 0);
(*elemHead)[0].typeID = API_ObjectID;
(*elemHead)[0].guid   = guid;
ACAPI_Element_ChangeParameters (elemHead, 1, &amp;amp;element, &amp;amp;memo, &amp;amp;mask);
&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Mar 2019 15:55:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Modify-attributes-of-my-own-object/m-p/179900#M6330</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-11T15:55:44Z</dc:date>
    </item>
  </channel>
</rss>

