<?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: Connection type value in API_ChangeParamType in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/629421#M9782</link>
    <description>&lt;P&gt;Hello. Thank you for sharing the link. Yes, I have checked it. However, something still is wrong. Do you know by any chance is there exists kind of a list of properties that can be changed and to what are they mapped? For example, is "Connection type" mapped to "connectionType" or "connection_type" or else, and what about other properties?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Sep 2024 08:09:43 GMT</pubDate>
    <dc:creator>Emkave</dc:creator>
    <dc:date>2024-09-02T08:09:43Z</dc:date>
    <item>
      <title>Connection type value in API_ChangeParamType</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/622295#M9750</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I'm encountering an issue while setting parameters for certain objects using the Archicad API.&lt;/P&gt;
&lt;P&gt;I have an instance of the API_ChangeParamType class (let's refer to it as object). This object has some crucial attributes, specifically name and uStrValue.&lt;/P&gt;
&lt;P&gt;I've correctly assigned object.name as "connectionType". However, I'm facing difficulties with object.uStrValue, which is being cast into an unsigned short pointer through this conversion: (GS::unchar_t*)connection_type_str.ToUStr().Get(). This conversion returns either 102 or 115.&lt;/P&gt;
&lt;P&gt;I'm not entirely sure what these values represent, but I suspect there might be an internal mapping of connection type strings to these unsigned short values within the Graphisoft API. For example, how would the connection type "spigot-spigot" be mapped in this context?&lt;/P&gt;
&lt;P&gt;The problem I'm encountering is that when I inspect the object's property in Archicad, the connection type consistently shows as "flat-flat" regardless of what I set.&lt;/P&gt;
&lt;P&gt;Has anyone else experienced this issue? If so, how did you resolve it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="grey"&gt;Operating system used: &lt;EM&gt;Windows 10&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 09:27:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/622295#M9750</guid>
      <dc:creator>Emkave</dc:creator>
      <dc:date>2024-09-09T09:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Connection type value in API_ChangeParamType</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/627367#M9760</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I wouldn't say that the conversion returns 102 or 115. Those are the values pointed to by the pointer (the first letter of the string). They are ascii/unicode codepoints. 102 = f and 115 = s. Which is consistent to the two entries you've mentioned (flat-flat and spigot-spigot). Just assigning that pointer to &lt;STRONG&gt;uStrValue&lt;/STRONG&gt; won't work, because of ownership/memory issues (What happens to values in memory where the pointer points to if the &lt;STRONG&gt;connection_type_str&lt;/STRONG&gt; goes out of context and is destroyed?)&lt;/P&gt;
&lt;P&gt;You'll need &lt;STRONG&gt;GS::ucscpy&lt;/STRONG&gt; to actually copy the content to &lt;STRONG&gt;uStrValue&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;GS::ucscpy(object.uStrValue, "spigot-spigot");&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;BR /&gt;Bernd&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 09:00:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/627367#M9760</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2024-08-23T09:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Connection type value in API_ChangeParamType</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/627536#M9765</link>
      <description>&lt;P&gt;Thank you for the help! I have checked once again and implemented your solution which compiled well.&lt;BR /&gt;So I carefully checked and made sure that the variable, storing uchar_t * will not get out of the scope so it could be properly used in the changing the pipe property.&lt;BR /&gt;Yet, however, when I try to change the parameter of the structure using ACAPI_LibraryPart_ChangeAParameter() that accepts a data structure that basically looks like:&lt;BR /&gt;{&lt;BR /&gt;char[] name = "connectionType",&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;unsigned short * uStrValue = 0x00000044434f9724 {115}&lt;BR /&gt;...&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Could it also be possible that after the change I need to execute some other form of the command so the change values are, kinda, emplaced fully into the graphisoft element?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 11:26:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/627536#M9765</guid>
      <dc:creator>Emkave</dc:creator>
      <dc:date>2024-08-23T11:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Connection type value in API_ChangeParamType</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/627546#M9767</link>
      <description>&lt;P&gt;Have you seen the example code using API_ChangeParamType&amp;nbsp;here:&amp;nbsp;&lt;A href="https://graphisoft.github.io/archicad-api-devkit/group___library_part.html#gacacd08acb7d5a1325838036d04d9929e" target="_blank"&gt;ACAPI_LibraryPart_OpenParameters&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This might help. If not, can you post some of your code so we can see what you've done so far?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 12:37:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/627546#M9767</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2024-08-23T12:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Connection type value in API_ChangeParamType</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/629421#M9782</link>
      <description>&lt;P&gt;Hello. Thank you for sharing the link. Yes, I have checked it. However, something still is wrong. Do you know by any chance is there exists kind of a list of properties that can be changed and to what are they mapped? For example, is "Connection type" mapped to "connectionType" or "connection_type" or else, and what about other properties?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 08:09:43 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/629421#M9782</guid>
      <dc:creator>Emkave</dc:creator>
      <dc:date>2024-09-02T08:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Connection type value in API_ChangeParamType</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/629422#M9783</link>
      <description>&lt;P&gt;I don't understand the question. I recommend that you post some code showing what you've done so far, pinpointing:&lt;/P&gt;
&lt;P&gt;- where something appears to be wrong;&lt;/P&gt;
&lt;P&gt;- what you expected to happen;&lt;/P&gt;
&lt;P&gt;- what has actually happened.&lt;/P&gt;
&lt;P&gt;I think it should be possible to solve the problem then.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Sep 2024 08:22:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Connection-type-value-in-API-ChangeParamType/m-p/629422#M9783</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2024-09-02T08:22:48Z</dc:date>
    </item>
  </channel>
</rss>

