<?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: Create a new text type label in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399640#M8621</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;I appreciate your quick and detailed reply!&lt;BR /&gt;I'll definitely try out the solution you suggested, I'm just wondering if there isn't a simpler way to access the text/autotext label shown in the label object's settings...&lt;BR /&gt;Thanks&amp;nbsp;again!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/57015i5B54703E3CECF24F/image-size/large?v=v2&amp;amp;px=999" border="0" alt="text-autotext label.png" title="text-autotext label.png" /&gt;</description>
    <pubDate>Tue, 26 Sep 2023 08:20:06 GMT</pubDate>
    <dc:creator>yahavsa</dc:creator>
    <dc:date>2023-09-26T08:20:06Z</dc:date>
    <item>
      <title>Create a new text type label</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399483#M8613</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I am trying to create a new Text type label. I want it to be of Text type regardless of whether the default label is of Text or Symbol type. When I use the ACAPI_Element_GetDefaults function to get the default data of the default label, I didn't find a way to modify the default to be Text type label when the default label is of Symbol. If there is another way to create a Text type label whether the default label is of Text or Symbol type I would love to hear about.&lt;BR /&gt;I would appreciate any&amp;nbsp;help,&amp;nbsp;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:19:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399483#M8613</guid>
      <dc:creator>yahavsa</dc:creator>
      <dc:date>2024-09-16T12:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new text type label</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399577#M8618</link>
      <description>&lt;P&gt;Hi Yahavsa!&lt;BR /&gt;&lt;BR /&gt;It's a bit tedious to get all the details right when converting a symbol to a text label (or the other way).&lt;BR /&gt;I've done the other way around for one of my Add-Ons, but unfortunately I don't have a working example for the direction you need.&lt;BR /&gt;Still I think I can give you some starting points of what to look at.&lt;BR /&gt;&lt;BR /&gt;1. You have to change the following members of the retrieved default element:&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;labelElem.label.labelClass;
labelElem.label.u.head.typeID = API_TextID;
labelElem.label.u.text // Set the members of this! Might help to initialize it first to zero with `= API_TextType{};` &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. You also have to allocate and fill the following memo members (Take a look at the API_LabelID entry for &lt;A href="https://archicadapi.graphisoft.com/documentation/acapi_element_getmemo" target="_self"&gt;ACAPI_Element_GetMemo&lt;/A&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;(char **) textContent
(short **) textLineStarts
(API_ParagraphType **) paragraphs&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You find some hints for how to allocate these in the example &lt;STRONG&gt;&lt;EM&gt;Element_Test&lt;/EM&gt;&lt;/STRONG&gt;. Especially in the file &lt;EM&gt;&lt;STRONG&gt;Element_Basics.cpp&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;I think &lt;EM&gt;&lt;STRONG&gt;textLineStarts&lt;/STRONG&gt;&lt;/EM&gt; is not necessary for very simple texts.&lt;BR /&gt;&lt;BR /&gt;Hope that gets you started!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 08:21:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399577#M8618</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-09-26T08:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new text type label</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399640#M8621</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I appreciate your quick and detailed reply!&lt;BR /&gt;I'll definitely try out the solution you suggested, I'm just wondering if there isn't a simpler way to access the text/autotext label shown in the label object's settings...&lt;BR /&gt;Thanks&amp;nbsp;again!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="http://community.graphisoft.com/t5/image/serverpage/image-id/57015i5B54703E3CECF24F/image-size/large?v=v2&amp;amp;px=999" border="0" alt="text-autotext label.png" title="text-autotext label.png" /&gt;</description>
      <pubDate>Tue, 26 Sep 2023 08:20:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399640#M8621</guid>
      <dc:creator>yahavsa</dc:creator>
      <dc:date>2023-09-26T08:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new text type label</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399936#M8624</link>
      <description>&lt;P&gt;I don't think there's a general easy way to set it up.&lt;BR /&gt;&lt;BR /&gt;If your situation allows it though, you could setup a favorite for the text label and get the basic setup then from that with &lt;A href="https://archicadapi.graphisoft.com/documentation/acapi_favorite_get" target="_self"&gt;ACAPI_Favorite_Get&lt;/A&gt;.&lt;BR /&gt;You might also find &lt;A href="https://archicadapi.graphisoft.com/documentation/acapi_favorite_import" target="_self"&gt;ACAPI_Favorite_Import&lt;/A&gt; and &lt;A href="https://archicadapi.graphisoft.com/documentation/acapi_favorite_export" target="_self"&gt;ACAPI_Favorite_Export&lt;/A&gt; helpful. Then you could store the favorite as a file and distribute it alongside your Add-On.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 18:37:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Create-a-new-text-type-label/m-p/399936#M8624</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-09-27T18:37:46Z</dc:date>
    </item>
  </channel>
</rss>

