<?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 custom paint tool in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639588#M9959</link>
    <description>&lt;P&gt;Does this have to be an API solution?&lt;/P&gt;
&lt;P&gt;Can you just use the surface painter tool that is already there in Archicad?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 01:14:53 GMT</pubDate>
    <dc:creator>Barry Kelly</dc:creator>
    <dc:date>2024-11-14T01:14:53Z</dc:date>
    <item>
      <title>How to click an Element and paint corresponding overridable attribute</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639535#M9957</link>
      <description>&lt;P&gt;Hi all, i would like to create a tool where users can select attributes (materials) and paint them onto elements of their choosing. The problem i am having right now is that when using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;ACAPI_Notification_CatchSelectionChange&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;static GSErrCode SelectionChangeHandler(const API_Neig* selElemNeig) {

    // Pseudo code
    if (selElemNeig-&amp;gt;neigID != APINeig_None) {
        auto err = ACAPI_CallUndoableCommand("Change element", []() {
            return ACAPI_Element_Change(...);
        });
        // err is Unkown Error when printed
        // after this the SelectionChangeHandler is being called repeatedly indefinitely
    }
    else
        ACAPI_WriteReport("All elements deselected", false);

    return NoError;
}   // SelectionChangeHandler&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am unable to update the element inside of the callback, im guessing based of the docs its not allowed to do DB operations on a seperate thread.&lt;BR /&gt;&lt;BR /&gt;I also tried using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;        API_Neig clickedNeig;

        ClickAnElem("Click an elem to select/deselect", API_ZombieElemID, &amp;amp;clickedNeig);

        auto err = ACAPI_CallUndoableCommand("Change element", []() {
            return ACAPI_Element_Change(...);
            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which works but i want to be able to select many things and paint accordingly. having this solution in a while loop ofcourse blocks the UI so the user cannot interact with other panels visible until ESC key is pressed. I have buttons in my to stop painting or changing colors.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 10:48:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639535#M9957</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-26T10:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom paint tool</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639588#M9959</link>
      <description>&lt;P&gt;Does this have to be an API solution?&lt;/P&gt;
&lt;P&gt;Can you just use the surface painter tool that is already there in Archicad?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 01:14:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639588#M9959</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2024-11-14T01:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom paint tool</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639608#M9961</link>
      <description>&lt;P&gt;Hi, unfortunately this is not possible since i want to both create the colors and paint them in the same palette. I understand the surface painter is exactly for picking colors and painting elements but i would like to create my own, and it seems to be impossible with the available APIs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mats.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 07:09:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639608#M9961</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-14T07:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom paint tool</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639826#M9964</link>
      <description>&lt;P&gt;This is now resolved. The trick was when we changed the element the user had selected this function was called again and became an infinite repeating loop. Checking if the same element was updated twice solved it.&lt;/P&gt;&lt;PRE&gt;static GSErrCode SelectionChangeHandler(const API_Neig* selElemNeig) {

    // Pseudo code
    if (selElemNeig-&amp;gt;neigID != APINeig_None) {
        auto err = ACAPI_CallUndoableCommand("Change element", []() {
            return ACAPI_Element_Change(...);
        });
        // err is Unkown Error when printed
        // after this the SelectionChangeHandler is being called repeatedly indefinitely
    }
    else
        ACAPI_WriteReport("All elements deselected", false);

    return NoError;
}   // SelectionChangeHandler&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 10:38:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/639826#M9964</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-15T10:38:39Z</dc:date>
    </item>
    <item>
      <title>Help with Surface Painter-like Functionality in ArchiCAD 28 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640409#M9988</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am currently working on a project in ArchiCAD 28, and I am trying to create a functionality similar to the &lt;STRONG&gt;Surface Painter&lt;/STRONG&gt; tool. The goal is to apply colors or materials to objects by clicking on them, but only applying the color to the specific parts I click on—just like how Surface Painter works.&lt;/P&gt;&lt;P&gt;Here’s what I want to achieve:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have a set of colors (or materials) available.&lt;/LI&gt;&lt;LI&gt;I need to click on a 3D object (or surface) in the ArchiCAD environment.&lt;/LI&gt;&lt;LI&gt;Once clicked, the selected color should be applied only to the clicked area (similar to the Surface Painter behavior).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I’ve been exploring the ArchiCAD API, but I’m unsure of the best approach to get this specific behavior. Can anyone provide insights into how I can capture mouse clicks on objects or surfaces and apply materials to the specific part clicked?&lt;/P&gt;&lt;P&gt;Any help, code snippets, or guidance would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 10:45:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640409#M9988</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-20T10:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Surface Painter-like Functionality in ArchiCAD 28 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640417#M9989</link>
      <description>&lt;P&gt;Personly, i'm a soft user, i use directly a gdl object with associated texture for painting wall if there are differrent painting on the wall like different color in bottom part and top part,or atistitic painting on dwelling building.&lt;/P&gt;&lt;P&gt;Please excuse my english.I have base, but i don't practice usually in office.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 12:58:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640417#M9989</guid>
      <dc:creator>VChristophe</dc:creator>
      <dc:date>2024-11-20T12:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Surface Painter-like Functionality in ArchiCAD 28 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640434#M9990</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;im not sure i understand how a gdl object works. Are you painting based on selection or are you creating your own objects with respective paintings. I.e are you detecting user clicks and painting accordingly?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 13:59:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640434#M9990</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-20T13:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Surface Painter-like Functionality in ArchiCAD 28 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640440#M9991</link>
      <description>&lt;P&gt;i define a surface by gdl standard vertex associate to surface, with a maximum of point.for the moment i use only for planar surface.You just have to put dhe object on the plane with a normal vector to the surface with a very small distance in order to have no confusion of surface between the structural surface(metal,concrete,wood panel).&lt;/P&gt;&lt;P&gt;with the primitive elements include body command.&lt;/P&gt;&lt;P&gt;(vert teve vect edge,pgon body base and material....)&lt;/P&gt;&lt;P&gt;you have 1024 parameters in a basic object, to help you.&lt;/P&gt;&lt;P&gt;actually i think the problem is about how to improve the gdl interface,like import and create parameters via excel like&amp;nbsp; a "list of elements"..&lt;/P&gt;&lt;P&gt;and test each view inside.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 14:05:33 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640440#M9991</guid>
      <dc:creator>VChristophe</dc:creator>
      <dc:date>2024-11-20T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Surface Painter-like Functionality in ArchiCAD 28 API</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640452#M9992</link>
      <description>&lt;P&gt;Am i understanding this correctly. For you to paint an object you create a new surface very close along the normal vector of the original surface?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was thinking of modifying the existing one, do you know how would this be possible using the c++ apis?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 14:41:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640452#M9992</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-20T14:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom paint tool</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640551#M9997</link>
      <description>&lt;P&gt;Just use the form tool above the wall, and manage your draft by note the color RGB,define by color or photoshop.&lt;/P&gt;&lt;P&gt;more simple.and have a special ID for painting ,and the price to associate with.&lt;/P&gt;&lt;P&gt;Aikido, omote and oura.&lt;/P&gt;&lt;P&gt;and for more complicated form you use verpex and mapping like painting under a dome in Toscane, if its original painting or mapping the texture to go fast.&lt;/P&gt;&lt;P&gt;its a fast example in the pictures under .Mapping its the fast way when picture already exist.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2024-11-21 102241.jpg" style="width: 808px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79811iCC2D3830439F388C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2024-11-21 102241.jpg" alt="Capture d’écran 2024-11-21 102241.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2024-11-21 102516.jpg" style="width: 334px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/79812iB2C543837D07BB1D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2024-11-21 102516.jpg" alt="Capture d’écran 2024-11-21 102516.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 09:26:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/640551#M9997</guid>
      <dc:creator>VChristophe</dc:creator>
      <dc:date>2024-11-21T09:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to click an Element and paint corresponding overridable attribute</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/641184#M10009</link>
      <description>&lt;P&gt;I have one more question regarding this topic that i hope someone can answer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When i use &lt;STRONG&gt;ACAPI_UserInput_GetPoint&lt;/STRONG&gt;&amp;nbsp;on the ref side of a wall the&amp;nbsp;&lt;STRONG&gt;ipgon&lt;/STRONG&gt; of &lt;STRONG&gt;API_GetPointType&lt;/STRONG&gt; is accurate to the &lt;STRONG&gt;refInd&lt;/STRONG&gt; on the Element&amp;nbsp;if i use &lt;STRONG&gt;ACAPI_Element_Get&lt;/STRONG&gt;&amp;nbsp;on the clicked wall. Now my question is this, if i add a window to this wall and click the same side, then the &lt;STRONG&gt;ipgon&amp;nbsp;&lt;/STRONG&gt;is changed but not the &lt;STRONG&gt;refInd&lt;/STRONG&gt;. How can i accurately get if the user clicked on the reference side (or any side where i can override the material for that matter)?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 10:58:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/641184#M10009</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-26T10:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to click an Element and paint corresponding overridable attribute</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/641188#M10011</link>
      <description>&lt;P&gt;[removed this reply]&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2024 11:24:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-click-an-Element-and-paint-corresponding-overridable/m-p/641188#M10011</guid>
      <dc:creator>mats1</dc:creator>
      <dc:date>2024-11-26T11:24:17Z</dc:date>
    </item>
  </channel>
</rss>

