<?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: Is a easy way to transform a POLY2_B into a sequence of HOTLINES? in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591387#M6409</link>
    <description>&lt;P&gt;Hello Otavio&lt;/P&gt;
&lt;P&gt;I made this object to do the job. It shows some borderlines.&lt;/P&gt;
&lt;P&gt;there must exsist a dictionary type parameter "viivat" in parameters table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The idea is that You Copy all poly2 ~&amp;nbsp; -commands in the parameters script&lt;/P&gt;
&lt;P&gt;write 1st line:&lt;/P&gt;
&lt;P&gt;n=0&lt;BR /&gt;&lt;BR /&gt;then replace all&amp;nbsp; "&lt;SPAN&gt;POLY2_B" (or whatewer You get from AC) with&amp;nbsp; "&lt;/SPAN&gt;n=n+1:put n"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;write this at the end:&lt;/P&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;dict viivat
for i= 1 to nsp
n=get(1)
m=get(1)



for k=1 to 12
kysy=get(1)
next k

for p=1 to m
viivat.viiva[n].piste[p].x=get(1)
viivat.viiva[n].piste[p].y=get(1)
viivat.viiva[n].piste[p].z=get(1)
next p

i=i+14+m*3
next i
parameters viivat=viivat&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;2d script: **************************************************************************************&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;!
! Nimi : Uusi objekti 1.gsm
! Päiväys : tiistai 13. heinäkuuta 2021
! Versio : 24.00
! ARCHICAD -FIN
! pertti,paasky@saunalahti.fi

mul2 A/426.031000, B/258.144000
add2 -374681.378, -6673549.076
drawindex 10
pen penAttribute_1
set line_type lineTypeAttribute_1


if haskey (viivat.viiva) then

for n= 1 to vardim1(viivat.viiva)
for p= 1 to vardim1(viivat.viiva[n].piste)
hotspot2 viivat.viiva[n].piste[p].x,viivat.viiva[n].piste[p].y
next p
next n


for n= 1 to vardim1(viivat.viiva)
for p= 1 to vardim1(viivat.viiva[n].piste)-1
line2 viivat.viiva[n].piste[p].x,viivat.viiva[n].piste[p].y,viivat.viiva[n].piste[p+1].x,viivat.viiva[n].piste[p+1].y
hotline2 viivat.viiva[n].piste[p].x,viivat.viiva[n].piste[p].y,viivat.viiva[n].piste[p+1].x,viivat.viiva[n].piste[p+1].y
next p
next n

endif
del 2&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Sun, 10 Mar 2024 03:17:47 GMT</pubDate>
    <dc:creator>Pertti Paasky</dc:creator>
    <dc:date>2024-03-10T03:17:47Z</dc:date>
    <item>
      <title>Is a easy way to transform a POLY2_B into a sequence of HOTLINES?</title>
      <link>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591306#M6408</link>
      <description>&lt;P&gt;Hello again!&lt;BR /&gt;&lt;BR /&gt;I'm making a object of some complex 2D symbols and i would like to be able to select the object by the lines wich are drawned, i know that we use the HOTLINE2 command to make this dream come true.&lt;BR /&gt;&lt;BR /&gt;But my problem is that the drawing is to complex for me to just write the hotlines, or the POLY2_B myself, So i'm drawing what i need to show in 2D and saving it like an object to use the poly2_b auto scripted. But by that, i dont have a consistant way to write te hotlines.&lt;BR /&gt;&lt;BR /&gt;Is there a way to do that easly?&lt;BR /&gt;&lt;BR /&gt;Cause i even tryied to make the chat gpt and gemini to translate the poly2_b cordinates to HOTLINES, it works almost perfectly, but it skips a line... like, the way that i taught GPT it writes a HOTLINE perfectly, but the next one that it writes is a line that is not connected. The request that i did for GPT is the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;The codes are in GDL language, a language specific to the Archicad program, and it is based on and closely related to BASIC.

Here's the translation of your instructions:

Next, I need to create a series of commands called HOTLINE2. This command is written by the following expression:

HOTLINE2 x1, y1, x2, y2, unID

where x1 is the initial position on the X plane of a line, x2 is the final position of the line on the X plane, y1 is the initial position on the Y plane of the same line, and y2 is the final position of the line on the Y plane. The unID expression can be described as 1.

Now I will provide you with a sequence of 211 expressions that contain 3 numbers in each line, separated by ",". The first two numbers in each line correspond to X and Y, respectively. I need you to take these expressions and for every two lines, extract the numbers corresponding to X and Y, identify them as the numbers x1, y1, x2, y2, and place them within the HOTLINE2 x1, y1, x2, y2, 1 expression.

Finally, understand that I do not want an expression that performs this conversion. I want you to present only the results in HOTLINE2 x1, y1, x2, y2, 1 converted from the following sequence of expressions.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The drawings that i made, the first  row is the fill element, the second it's for me to see what i draw, the tird is the outline (witch i wanna use as hotlines) and the final row is the internal lines" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/54403i69B62FE655538304/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="The drawings that i made, the first  row is the fill element, the second it's for me to see what i draw, the tird is the outline (witch i wanna use as hotlines) and the final row is the internal lines" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The drawings that i made, the first  row is the fill element, the second it's for me to see what i draw, the tird is the outline (witch i wanna use as hotlines) and the final row is the internal lines&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="the beggining of the 2D script" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/54404i440446B7EBBF1780/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="the beggining of the 2D script" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;the beggining of the 2D script&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="the red line is an aproximation of the hotlines that are drawn and converted from the gpt script" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/54405iB46AB1D87467B185/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="the red line is an aproximation of the hotlines that are drawn and converted from the gpt script" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;the red line is an aproximation of the hotlines that are drawn and converted from the gpt script&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:14:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591306#M6408</guid>
      <dc:creator>Otavio Augusto</dc:creator>
      <dc:date>2024-09-26T11:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is a easy way to transform a POLY2_B into a sequence of HOTLINES?</title>
      <link>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591387#M6409</link>
      <description>&lt;P&gt;Hello Otavio&lt;/P&gt;
&lt;P&gt;I made this object to do the job. It shows some borderlines.&lt;/P&gt;
&lt;P&gt;there must exsist a dictionary type parameter "viivat" in parameters table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The idea is that You Copy all poly2 ~&amp;nbsp; -commands in the parameters script&lt;/P&gt;
&lt;P&gt;write 1st line:&lt;/P&gt;
&lt;P&gt;n=0&lt;BR /&gt;&lt;BR /&gt;then replace all&amp;nbsp; "&lt;SPAN&gt;POLY2_B" (or whatewer You get from AC) with&amp;nbsp; "&lt;/SPAN&gt;n=n+1:put n"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;write this at the end:&lt;/P&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;dict viivat
for i= 1 to nsp
n=get(1)
m=get(1)



for k=1 to 12
kysy=get(1)
next k

for p=1 to m
viivat.viiva[n].piste[p].x=get(1)
viivat.viiva[n].piste[p].y=get(1)
viivat.viiva[n].piste[p].z=get(1)
next p

i=i+14+m*3
next i
parameters viivat=viivat&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;2d script: **************************************************************************************&lt;/DIV&gt;
&lt;DIV&gt;&lt;LI-CODE lang="markup"&gt;!
! Nimi : Uusi objekti 1.gsm
! Päiväys : tiistai 13. heinäkuuta 2021
! Versio : 24.00
! ARCHICAD -FIN
! pertti,paasky@saunalahti.fi

mul2 A/426.031000, B/258.144000
add2 -374681.378, -6673549.076
drawindex 10
pen penAttribute_1
set line_type lineTypeAttribute_1


if haskey (viivat.viiva) then

for n= 1 to vardim1(viivat.viiva)
for p= 1 to vardim1(viivat.viiva[n].piste)
hotspot2 viivat.viiva[n].piste[p].x,viivat.viiva[n].piste[p].y
next p
next n


for n= 1 to vardim1(viivat.viiva)
for p= 1 to vardim1(viivat.viiva[n].piste)-1
line2 viivat.viiva[n].piste[p].x,viivat.viiva[n].piste[p].y,viivat.viiva[n].piste[p+1].x,viivat.viiva[n].piste[p+1].y
hotline2 viivat.viiva[n].piste[p].x,viivat.viiva[n].piste[p].y,viivat.viiva[n].piste[p+1].x,viivat.viiva[n].piste[p+1].y
next p
next n

endif
del 2&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Sun, 10 Mar 2024 03:17:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591387#M6409</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-03-10T03:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is a easy way to transform a POLY2_B into a sequence of HOTLINES?</title>
      <link>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591436#M6410</link>
      <description>&lt;P&gt;Wow, simply wow! This is amazing Pertti!!!&lt;BR /&gt;&lt;BR /&gt;Thank you very very much, i loved it! Just math and programming, this communit is insane haha&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, how can i use the result from it in my object, must i use a call parameter inside mt object or should i input a print command to copy the resulting hotline string, or something else?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Anyhow, you are amazing!&lt;/P&gt;&lt;P&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 13:26:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591436#M6410</guid>
      <dc:creator>Otavio Augusto</dc:creator>
      <dc:date>2024-03-07T13:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is a easy way to transform a POLY2_B into a sequence of HOTLINES?</title>
      <link>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591454#M6411</link>
      <description>&lt;P&gt;Hi Otavio.&lt;/P&gt;
&lt;P&gt;I see You have several figures in one object.&lt;/P&gt;
&lt;P&gt;Every figure has its own polygons wich You have to prepare&amp;nbsp; by dragging the fill from 2d to 2d script. I would use one dictionary parameter for every figure.&lt;/P&gt;
&lt;P&gt;Like this:&lt;/P&gt;
&lt;P&gt;dict figures&lt;/P&gt;
&lt;P&gt;figures.figure[iFigure].polylines[iPolyline]=...&lt;/P&gt;
&lt;P&gt;figures.figure[iHatch].hatches[iHatch]=....&lt;/P&gt;
&lt;P&gt;figures.figure[iHotline].hotlines[iHotline]=....&lt;/P&gt;
&lt;P&gt;and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Every set of poly2 entities must be translated to fit the algorithms by replacing those lines mentioned early.&lt;/P&gt;
&lt;P&gt;You can organize this in parameters script.&lt;/P&gt;
&lt;P&gt;BR. Pertti&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 15:24:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Is-a-easy-way-to-transform-a-POLY2-B-into-a-sequence-of-HOTLINES/m-p/591454#M6411</guid>
      <dc:creator>Pertti Paasky</dc:creator>
      <dc:date>2024-03-07T15:24:10Z</dc:date>
    </item>
  </channel>
</rss>

