<?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: xml pen-set attribut-number in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/372475#M4746</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TL;DR: There are 2 indices. Try to keep them identical to avoid confusion. I've developed an Add-On which might help you: &lt;A href="https://www.bschwb.com/add-ons/pen-manager/" target="_blank"&gt;https://www.bschwb.com/add-ons/pen-manager/&lt;/A&gt; But it depends on what you actually want to achieve. More explanation below.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I had a look into your problem in more detail and I think I've figured it out (but still take it with a grain of salt):&lt;BR /&gt;&lt;BR /&gt;There are two different indices!&lt;BR /&gt;- One is displayed in the Attribute Manager under the Column '#'. This corresponds to the "physical" ordering in the .xml file you were describing.&lt;BR /&gt;- The other one is an internal Index which in the xml is placed in the tag '&amp;lt;Index&amp;gt;'&lt;BR /&gt;&lt;BR /&gt;A small demonstration that hopefully illustrates the point a bit:&lt;BR /&gt;1. Export a pen set via the Attribute Manger to an .xml file&lt;/P&gt;
&lt;P&gt;2. Reorder the first pen to the 5th 'physical' place but keep the &amp;lt;Index&amp;gt;1&amp;lt;/Index&amp;gt; tag.&lt;/P&gt;
&lt;P&gt;3. Import the pen set again via the Attribute Manager&lt;/P&gt;
&lt;P&gt;4. Using the pen e.g. in the "Wall Settings" shows the two different indices (See annotated screenshot)&lt;BR /&gt;&lt;BR /&gt;To avoid confusion, I would keep the two indices identical all the time. So if you manually reorder the list, I would also change the &amp;lt;Index&amp;gt; tag accordingly.&lt;BR /&gt;&lt;BR /&gt;What my 'Pen-Manager' Add-On does:&lt;BR /&gt;When copying one pen to a different pen it keeps both indices of the target pen but changes the Color, Width and Description of the Target Pen!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-08 090704.png" style="width: 837px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/34924i976916E1B11186C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-03-08 090704.png" alt="Screenshot 2023-03-08 090704.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;EXTRA NOTE&lt;/STRONG&gt; for Add-On developers:&lt;BR /&gt;In the API_PenType the field 'index' stores the internal index, but elements seem to store the 'physical' index (e.g. element.wall.contPen).&lt;BR /&gt;&lt;BR /&gt;I hope this helps!&lt;BR /&gt;Bernd&lt;/P&gt;</description>
    <pubDate>Wed, 08 Mar 2023 08:43:44 GMT</pubDate>
    <dc:creator>BerndSchwarzenbacher</dc:creator>
    <dc:date>2023-03-08T08:43:44Z</dc:date>
    <item>
      <title>xml pen-set attribut-number</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/372315#M4745</link>
      <description>&lt;P&gt;Hello together&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Following Use-Case: We want to change the order of our pens in a pen-set. It's possible to change the index of a pen-set directly in the attribute manager, why not the index of pens? Anyway we saved an xml and changed all the indexes and names, then reimport it, nothing happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Problem: We changed all the indexes, but in the xml the order of all the pens are the same, when we change the order in the xml (physical order) then there's a change in Archicad. Is it true, that Archicad ignores the index completly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="06-03-_2023_11-47-15.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/56149iF35A314619DD02D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="06-03-_2023_11-47-15.png" alt="06-03-_2023_11-47-15.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 11:50:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/372315#M4745</guid>
      <dc:creator>bimdo</dc:creator>
      <dc:date>2024-09-17T11:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: xml pen-set attribut-number</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/372475#M4746</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;TL;DR: There are 2 indices. Try to keep them identical to avoid confusion. I've developed an Add-On which might help you: &lt;A href="https://www.bschwb.com/add-ons/pen-manager/" target="_blank"&gt;https://www.bschwb.com/add-ons/pen-manager/&lt;/A&gt; But it depends on what you actually want to achieve. More explanation below.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I had a look into your problem in more detail and I think I've figured it out (but still take it with a grain of salt):&lt;BR /&gt;&lt;BR /&gt;There are two different indices!&lt;BR /&gt;- One is displayed in the Attribute Manager under the Column '#'. This corresponds to the "physical" ordering in the .xml file you were describing.&lt;BR /&gt;- The other one is an internal Index which in the xml is placed in the tag '&amp;lt;Index&amp;gt;'&lt;BR /&gt;&lt;BR /&gt;A small demonstration that hopefully illustrates the point a bit:&lt;BR /&gt;1. Export a pen set via the Attribute Manger to an .xml file&lt;/P&gt;
&lt;P&gt;2. Reorder the first pen to the 5th 'physical' place but keep the &amp;lt;Index&amp;gt;1&amp;lt;/Index&amp;gt; tag.&lt;/P&gt;
&lt;P&gt;3. Import the pen set again via the Attribute Manager&lt;/P&gt;
&lt;P&gt;4. Using the pen e.g. in the "Wall Settings" shows the two different indices (See annotated screenshot)&lt;BR /&gt;&lt;BR /&gt;To avoid confusion, I would keep the two indices identical all the time. So if you manually reorder the list, I would also change the &amp;lt;Index&amp;gt; tag accordingly.&lt;BR /&gt;&lt;BR /&gt;What my 'Pen-Manager' Add-On does:&lt;BR /&gt;When copying one pen to a different pen it keeps both indices of the target pen but changes the Color, Width and Description of the Target Pen!&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-03-08 090704.png" style="width: 837px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/34924i976916E1B11186C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-03-08 090704.png" alt="Screenshot 2023-03-08 090704.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;EXTRA NOTE&lt;/STRONG&gt; for Add-On developers:&lt;BR /&gt;In the API_PenType the field 'index' stores the internal index, but elements seem to store the 'physical' index (e.g. element.wall.contPen).&lt;BR /&gt;&lt;BR /&gt;I hope this helps!&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 08:43:44 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/372475#M4746</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2023-03-08T08:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: xml pen-set attribut-number</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/373914#M4747</link>
      <description>&lt;P&gt;Thank you Bernd for this really great answer, now I understand it!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 22:50:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/xml-pen-set-attribut-number/m-p/373914#M4747</guid>
      <dc:creator>bimdo</dc:creator>
      <dc:date>2023-03-21T22:50:07Z</dc:date>
    </item>
  </channel>
</rss>

