Experimental Python add-on is available for Archicad 23
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-07-19
11:22 AM
- last edited on
‎2022-10-05
01:24 PM
by
Daniel Kassai
See the blog post on the developer site: https://archicadapi.Graphisoft.com/experimental-python-add-on-for-archicad23
Good luck!
Akos
- Labels:
-
Automation (Python or JSON)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-11-24 02:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-11-24 02:42 PM
Karl wrote:Thanks for your reply.
Of course, I understand that this is an experimental addition.
I have and in mind being asked something demand.
Me interestingly simply to talk to the, can anyone, that interesting will tell or will advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-02 05:02 PM
Also, could someone point me where to find defitionGuid for ID parameter (or any other) of an element?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-03 08:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-03 10:04 AM
Petar.Pejic wrote:I sometimes do this: if I can not find how to access the desired parameter then I use *.List(). The console unloads a list of all parameters and you can try to find the one that affects the composite wall.
I managed to get and change ID of elements, but I am struggling how to get for example composite name of the wall? Should one use getproperty or getattribute?
if it helps here:
guid = ClickElement() element = GetWall(guid) index_attrib_composit = 19 index_attrib_build_mat = 3 element.modelElemStructureType = 1 # 0 - non-composit, 1 - composit, 2 - profile if element.modelElemStructureType == 1: element.composite = number_att_composit else: element.buildingMaterial = index_attrib_build_mat ChangeWall(element)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-03 11:08 AM
Additional question, how do you get string for the name of the specific composite / building material or anything else rather then the number? What would be the logic behind it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-03 11:34 AM
Petar.Pejic wrote:Well the first thing that came to mind:
That is a great tip, thank you for sharing your knowledge!
Additional question, how do you get string for the name of the specific composite / building material or anything else rather then the number? What would be the logic behind it?
dict_comp_wall = GetAttributeDictionary(API_CompWallID) index_attrib_composit = 19 for key, attribute in dict_comp_wall.items(): if index_attrib_composit == attribute.index: print(key, attribute.name)Accordingly as a parameter name (attribute.*) can be anything that refers to it
P.S.
By the way
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-03 05:27 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-04 01:47 AM
The problem is that the structure used - API_ParagraghType - uses as its first value 'from'. This is a keyword in Python and is a error if used as a variable. Is there any workaround for this problem? Anyone have any code to duplicate the rich text example?
Windows 11 - Visual Studio 2022; ArchiCAD 27
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-12-04 07:59 AM
poco2013 wrote:Please show the script, I almost understood
I've been experimenting with the python functions and ran into a problem with the CreateText function. I was trying to duplicate the the rich text example in the Element Test example add_on.
The problem is that the structure used - API_ParagraghType - uses as its first value 'from'. This is a keyword in Python and is a error if used as a variable. Is there any workaround for this problem? Anyone have any code to duplicate the rich text example?
