<?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 Convert morph to an Object in C++ Add-On code in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/613908#M9609</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a function that would convert the given Morph GUID to an Object in C++ API like we do it in UI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kency_0-1720005671602.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/65562i9E864D0B66C388E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="kency_0-1720005671602.png" alt="kency_0-1720005671602.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 03:15:40 GMT</pubDate>
    <dc:creator>kency</dc:creator>
    <dc:date>2024-07-05T03:15:40Z</dc:date>
    <item>
      <title>Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/613908#M9609</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a function that would convert the given Morph GUID to an Object in C++ API like we do it in UI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kency_0-1720005671602.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/65562i9E864D0B66C388E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="kency_0-1720005671602.png" alt="kency_0-1720005671602.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 03:15:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/613908#M9609</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-05T03:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614167#M9620</link>
      <description>&lt;P&gt;Hi kency,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, you can simulate that; please look at&amp;nbsp;&lt;A href="https://graphisoft.github.io/archicad-api-devkit/struct_a_p_i___save_pars___object.html" target="_blank"&gt;https://graphisoft.github.io/archicad-api-devkit/struct_a_p_i___save_pars___object.html&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 14:02:10 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614167#M9620</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-07-04T14:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614513#M9631</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;Couple of doubts -&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;We will need to write the GSM to a file right?&lt;/LI&gt;&lt;LI&gt;Will this convert the existing morph to a furniture object?&lt;/LI&gt;&lt;LI&gt;Got the errorCode -&lt;P class=""&gt;&lt;SPAN class=""&gt;-2130312312 :&amp;nbsp;&lt;SPAN&gt;APIERR_REFUSEDCMD&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;when I tried the below:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;GS::Array&amp;lt;API_Neig&amp;gt; selNeigs;
API_Neig neig (element.header.guid); // Element guid of a morph
selNeigs.Push(neig);
ACAPI_Selection_Select(selNeigs, true);
API_FileSavePars    fsp = {};
fsp.fileTypeID = APIFType_ObjectFile;
IO::Location outputFile (GetSpecialFolderLocation (API_UserDocumentsFolderID), IO::Name ("Test.gsm"));
fsp.file = &amp;amp;outputFile;
API_SavePars_Object objectPars = {};
objectPars.libItMode = APIConvMod_SymTxtGDL;
objectPars.removeLine = true;
objectPars.saveSelOnly = true;
objectPars.isPlaceable = true;
err = ACAPI_ProjectOperation_Save (&amp;amp;fsp, &amp;amp;objectPars);
if (err != NoError) {
    std::cout&amp;lt;&amp;lt; "Error " &amp;lt;&amp;lt; err &amp;lt;&amp;lt; std::endl;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 06:01:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614513#M9631</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-08T06:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614594#M9641</link>
      <description>&lt;P&gt;Hello kency,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried your code, and it works both from the Plan and the 3D window if I call it from the Test menu as a new command. When/where do you call that function? From the code that error message trivially may come from two places: if you are in a DEMO Archicad, or if command execution is not allowed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will save the object as a generic Model Element, you have to modify its subtype later, or classify it as a furniture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas along that line?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Akos&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 13:09:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614594#M9641</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-07-08T13:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614703#M9645</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;I was on non Demo version of Archicad. But the code was under Undoable command. After moving it out of the Undoable Command i could see that the gsm file got created in the specified location. But the morph still remained as a Morph element. How do we convert the morph element to furniture?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: My bad, i thought the UI option Save Selection created the gsm file as well as converted the existing morph to an object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything that can convert the morph as an object?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 09:05:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614703#M9645</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-09T09:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614907#M9656</link>
      <description>&lt;P&gt;Hi kency,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no function on the API that would do the conversion.&lt;/P&gt;
&lt;P&gt;But: you can delete the morph element (save its location first &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;), and place a new object instead that refers to that gsm file you saved. The delete and create operations should be under undoable scope...&lt;/P&gt;
&lt;P&gt;Also, create the .gsm file in the embedded library instead of any generic folder so that it can become part of the plan file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 12:57:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/614907#M9656</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-07-10T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615128#M9669</link>
      <description>&lt;P&gt;Clear on this&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;thank you so much! The whole problem statement has been raised &lt;A href="https://community.graphisoft.com/t5/Archicad-C-API/Babylon-json-file-to-gsm-or-furniture/td-p/615127" target="_blank"&gt;here&lt;/A&gt;. Any thoughts on that as well ?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 10:51:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615128#M9669</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-11T10:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615154#M9671</link>
      <description>&lt;P&gt;Just another query is there any way to remove the lines between facets?&amp;nbsp; &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image (1).png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/65996iFF26E6704479FD31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image (1).png" alt="image (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 13:11:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615154#M9671</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-11T13:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615155#M9672</link>
      <description>&lt;P&gt;Could you please attach the GDL file itself?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 13:16:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615155#M9672</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-07-11T13:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615593#M9676</link>
      <description>&lt;P&gt;Sure. Have attached the zip for gsm and even the pln file&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2024 07:50:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615593#M9676</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-15T07:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615626#M9677</link>
      <description>&lt;P&gt;Hi kency,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here comes the modified object (inside the .pln).&lt;/P&gt;
&lt;P&gt;I replaced the '262144' in the EDGE commands with '2' -- see the statuses for the EDGE statement in the GDL manual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-07-15 at 13.32.40.png" style="width: 720px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/66169iED6135ADDF07AA89/image-dimensions/720x287?v=v2" width="720" height="287" role="button" title="Screenshot 2024-07-15 at 13.32.40.png" alt="Screenshot 2024-07-15 at 13.32.40.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 14:08:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615626#M9677</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-07-16T14:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615742#M9680</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;This gsm was created from Morph using the command we shared earlier&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://graphisoft.github.io/archicad-api-devkit/struct_a_p_i___save_pars___object.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://graphisoft.github.io/archicad-api-devkit/struct_a_p_i___save_pars___object.html&lt;/A&gt;&lt;SPAN&gt;. So is there something we can correct here itself? Rather than editing the created gsm again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 03:56:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/615742#M9680</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-07-16T03:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/616127#M9687</link>
      <description>&lt;P&gt;Hi kency,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You're welcome!&lt;/P&gt;
&lt;P&gt;Well, there isn't any parameter in that function that would affect the script that way.&lt;/P&gt;
&lt;P&gt;But: you can update the 3D script of the created library part with ACAPI_LibraryPart_UpdateSection().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best, Akos&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 09:56:57 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/616127#M9687</guid>
      <dc:creator>Akos Somorjai</dc:creator>
      <dc:date>2024-07-17T09:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert morph to an Object in C++ Add-On code</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/621410#M9745</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7122"&gt;@Akos Somorjai&lt;/a&gt;&amp;nbsp;We are updating the edge status, which worked for most of the gsm files, except for a few. Looks like these are not edge lines and instead it is something else.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Do you have any more suggestions? Attaching the gsm file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kency_0-1723010807951.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/69805iA35FF95155E1939B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kency_0-1723010807951.png" alt="kency_0-1723010807951.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. On another note, we could not remove the facet lines on a morph through the add-on API. We have the option in Archicad UI though. We bumped into this discussion &lt;A title="Hide morph edge" href="https://community.graphisoft.com/t5/Archicad-C-API/Help-with-setting-morph-s-hidden-edges-in-the-API/m-p/572691" target="_blank" rel="noopener"&gt;here&lt;/A&gt;. Is there any other way to remove these lines through code?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 06:17:35 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-morph-to-an-Object-in-C-Add-On-code/m-p/621410#M9745</guid>
      <dc:creator>kency</dc:creator>
      <dc:date>2024-08-07T06:17:35Z</dc:date>
    </item>
  </channel>
</rss>

