<?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: Favourites and script/python/c# component in Parametric design</title>
    <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219622#M433</link>
    <description>I'd be interested in those C# scripts! Sounds promising.&lt;BR /&gt;
Have you ever considered making a GitHub for that?&lt;BR /&gt;
&lt;BR /&gt;
Cheers, runxel</description>
    <pubDate>Mon, 07 Dec 2020 09:14:12 GMT</pubDate>
    <dc:creator>runxel</dc:creator>
    <dc:date>2020-12-07T09:14:12Z</dc:date>
    <item>
      <title>Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219620#M431</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;I'm playing with the connection (I'm a newbie in Rhino/Grasshopper), and I'm a bit confused about what is possible to do programmatically.&lt;BR /&gt;
&lt;BR /&gt;
So, I read in the connection manual that for most elements, the parameters available are not complete, and if we want completion we should use favourites and connect them to design components directly.&lt;BR /&gt;
&lt;BR /&gt;
In order to avoid having dozens of favourites with only minor changes between them, is there a way to do this: insert a script/python/c# component (say between a wall favourite and wall design or between wall design and wall parameter) and change for example the thickness or the layer of the wall?&lt;BR /&gt;
&lt;BR /&gt;
As a test, I try to have a script component with the favourite as input and an unaltered copy as output (either by a = x, or python deepcopy or a copy using classes), and I get "data conversion failed from goo to wall settings". Type hinting is not useful either.&lt;BR /&gt;
&lt;BR /&gt;
I guess the more general question, for scripting, when the archicad component has an archicad structure/object as an output, are the data in it private and totally inaccessible or there's a way to read/parse/copy/edit them?&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 May 2023 09:03:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219620#M431</guid>
      <dc:creator>alexsks</dc:creator>
      <dc:date>2023-05-11T09:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219621#M432</link>
      <description>To answer my own question, in case someone who reads this is also considering scripting possibilities.&lt;BR /&gt;
&lt;BR /&gt;
So it seems (most?) Archicad data (from favourite components or others) can be read/changed after all.&lt;BR /&gt;
&lt;BR /&gt;
With a C# script, if you make sure you avoid an (implicit) conversion (from the original Archicad class to the generic Grasshopper class) while getting the data, then you GetType(), and then with intellisense/autocomplete you can see what's inside the Archicad class, including parameters you can change by script.&lt;BR /&gt;
&lt;BR /&gt;
I have ended up writing a small number of helper functions (creating/deleting a component on the grasshopper canvas, connecting/disconnecting objects, getting/setting data, etc). It's basic functionality, but it takes quite a bit of time if one is not familiar with the Rhino/Grasshopper API, or also C#. I could attach them here at some point, if there is an interest.&lt;BR /&gt;
&lt;BR /&gt;
I'm not sure if Python is a good option for the above, I didn't give it a proper chance, but the dynamic typing and also the inferior intellisense created problems for me.</description>
      <pubDate>Sun, 06 Dec 2020 00:36:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219621#M432</guid>
      <dc:creator>alexsks</dc:creator>
      <dc:date>2020-12-06T00:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219622#M433</link>
      <description>I'd be interested in those C# scripts! Sounds promising.&lt;BR /&gt;
Have you ever considered making a GitHub for that?&lt;BR /&gt;
&lt;BR /&gt;
Cheers, runxel</description>
      <pubDate>Mon, 07 Dec 2020 09:14:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219622#M433</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2020-12-07T09:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219623#M434</link>
      <description>I hadn't thought of it, but it's a good idea. With some free time, hopefully in the next weeks, I'll make some tests and also prepare a mini example, so it's possible to start basic work straightaway, without necessarily having to look first at the code. I'll write the GitHub link here.</description>
      <pubDate>Tue, 08 Dec 2020 02:21:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219623#M434</guid>
      <dc:creator>alexsks</dc:creator>
      <dc:date>2020-12-08T02:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219624#M435</link>
      <description>That sounds definitely interessting. So do you think is there a chance to e.g. directly have list access on AC-API Input Components (which you would have to select no manually e.g. Zone Categories) so that you can finally choose one based on a GH List?&lt;BR /&gt;
&lt;BR /&gt;



That would be awsome!</description>
      <pubDate>Mon, 18 Jan 2021 10:34:27 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219624#M435</guid>
      <dc:creator>JSN</dc:creator>
      <dc:date>2021-01-18T10:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219625#M436</link>
      <description>I've been unexpectedly very busy lately, I still have it in my to-do list to edit and upload the script.&lt;BR /&gt;
&lt;BR /&gt;
So, to make it a precise step by step, by list access of input components and choosing, you mean something like this scenario?&lt;BR /&gt;
&lt;BR /&gt;
1) Programmatically (or not) add a zone category component on GH.&lt;BR /&gt;
2) Programmatically (or not) create a GH list (or extract one) that for example contains string entries "Zone Category A", "Zone Category B" etc (zone categories already existing on AC). &lt;BR /&gt;
3) Programmatically select, say, "Zone Category B" for the newly created zone category component. (Which I assume is then linked on GH to a Zone Setting component).&lt;BR /&gt;
&lt;BR /&gt;
Did I understand correctly?&lt;BR /&gt;
&lt;BR /&gt;
1 and 2 are easy. 3 is tricky, you can let me know if I got it right above and then I write some of my tests on that.</description>
      <pubDate>Mon, 18 Jan 2021 23:55:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219625#M436</guid>
      <dc:creator>alexsks</dc:creator>
      <dc:date>2021-01-18T23:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219626#M437</link>
      <description>Yeah, for example you have a a schedule of rooms with given parameters like "Name / Number / Zone Category / Area / ... " and you want to automatically create those rooms.&lt;BR /&gt;
&lt;BR /&gt;
This is working but not in terms of Inout types like Zone Category, as you simply cannot match them with the existing ones in the project. It is actually not very Grasshopper-like to pick and choose such entities from a Drop Down Menu, but I guess there must be a reason behind it ...</description>
      <pubDate>Tue, 19 Jan 2021 08:25:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219626#M437</guid>
      <dc:creator>JSN</dc:creator>
      <dc:date>2021-01-19T08:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219627#M438</link>
      <description>I understand.&lt;BR /&gt;
&lt;BR /&gt;
It's bad luck that, generally, the input components seem to be the worse to play with. As I understand, they don't contain the full data of what they hold, but references to the object/thing in AC.&lt;BR /&gt;
&lt;BR /&gt;
At least with favourites (and some other inputs) you can extract/deconstruct the data with the right component connection (and then explore/manipulate subvalues). But zone category is not like this. I tried everything that looks like a setter in the zone category component class (to change/set without a drop-down) but all I got was errors, items seem to be read-only.&lt;BR /&gt;
&lt;BR /&gt;
I don't know, perhaps the solution is purely in GH. I assume the drop-down could be some GH construct that can be manipulated/extracted/clicked programmatically.</description>
      <pubDate>Tue, 19 Jan 2021 23:33:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219627#M438</guid>
      <dc:creator>alexsks</dc:creator>
      <dc:date>2021-01-19T23:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219628#M439</link>
      <description>Ok, thx for your efforts. I was afraid that this is again a dead end, but if I would be that easy we this feature might already exist. However I still hope that in the near future the Live Bridge will be improved as it is not just about the example I elaborated above. At the moment it requires still too much manual input and there is so much potential left.</description>
      <pubDate>Wed, 20 Jan 2021 09:28:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219628#M439</guid>
      <dc:creator>JSN</dc:creator>
      <dc:date>2021-01-20T09:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219629#M440</link>
      <description>I agree, there's so much potential left, let's hope!</description>
      <pubDate>Wed, 20 Jan 2021 23:16:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219629#M440</guid>
      <dc:creator>alexsks</dc:creator>
      <dc:date>2021-01-20T23:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Favourites and script/python/c# component</title>
      <link>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219630#M441</link>
      <description>As far as I know (and figured out) one can get list of attributes of certain AC_Attribute (called "Inputs" in ARCHICAD GH Addon)  but read-only (In python). &lt;BR /&gt;
Create python component and give it input "zone" and connect "Zone Category" to it, then write in component:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;for zone_attr in dir(zone):
    print zone_attr
&lt;/PRE&gt; &lt;BR /&gt;
&lt;BR /&gt;
connect output "out" to panel and one can get list of avaliable attributes like Category number, Color, Name.&lt;BR /&gt;
Try other AC_attribute components&lt;BR /&gt;
I asked GS Crew if its possible to create programatically an object of ie AC_ZoneCategory class set its valaues and pass it to Zone Settings component and they responded:  "Computer says No"</description>
      <pubDate>Wed, 07 Apr 2021 22:53:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Parametric-design/Favourites-and-script-python-c-component/m-p/219630#M441</guid>
      <dc:creator>greg_lupo</dc:creator>
      <dc:date>2021-04-07T22:53:02Z</dc:date>
    </item>
  </channel>
</rss>

