Python Question for Graphisoft

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-19
09:27 PM
- last edited on
2021-09-15
10:34 AM
by
Noemi Balogh
However, the most notable deficiency in the development environment is the lack of 'intellisence' in Pycharm.
Wondering if 'intellisence' could be added or if that is even possible. It seems that if Python's purpose is to allow automation for the average project manager, that 'intellisence would be mandatory?
Windows 11 - Visual Studio 2022; ArchiCAD 27
Solved! Go to Solution.
- Labels:
-
Automation (Python or JSON)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-20 09:45 AM
Thank you for starting this topic! I hope there will be many questions here.
But I think it's clearer if you start a new topic for each question or issue related to Python API.
Some kind of intellisence is already available, just like code completion.
I've just recorded a video in Visual Studio Code how it works:
What do you think which intellisense features are missing the most?
Yes, our main purpose is to allow simple automation for BIM Managers. So I would love to hear how are you doing the Python API!
As you may have heard at the Building Together Event, we will extend the available JSON/Python commands in ARCHICAD 24 updates also and we will try to improve it continuously.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-20 09:45 AM
Thank you for starting this topic! I hope there will be many questions here.
But I think it's clearer if you start a new topic for each question or issue related to Python API.
Some kind of intellisence is already available, just like code completion.
I've just recorded a video in Visual Studio Code how it works:
What do you think which intellisense features are missing the most?
Yes, our main purpose is to allow simple automation for BIM Managers. So I would love to hear how are you doing the Python API!
As you may have heard at the Building Together Event, we will extend the available JSON/Python commands in ARCHICAD 24 updates also and we will try to improve it continuously.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-20 01:09 PM
I installed VS code and the Intellisence is working there. Not sure why it's not working in PyCharm but it doesn't matter since it looks like I'll be switching to VS code.
Looking forward to the next Python API update.
Windows 11 - Visual Studio 2022; ArchiCAD 27
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-20 02:16 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-20 06:18 PM
JSN wrote:I played with Pycharm a little more and did verify that it IS working somewhat. But not nearly as well as in VS code, as it is somewhat spotty. The main classes of acc,act,& acu seem to work OK but not so much others.
Can confirm. It is indeed not working in PyCharm. Do I have to switch as well or do you know why it is not supported there?
There are two add-ins for Pycharm which have a better reputation. JEDI and KITE. KITE seems to be the better one. Other than that,I don't have any experience with them.
I will be moving to VS code , now that I am aware of it. -- Free
Windows 11 - Visual Studio 2022; ArchiCAD 27
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-21 10:38 AM
poco2013 wrote:Ok, thx for the hint. However I guess I have to convince IT for a switch to VS Code installation as well, as otherwise, for me personally, it's a bit hard to familiarize with the syntax as I could only guess or try to look it up.
I played with Pycharm a little more and did verify that it IS working somewhat. But not nearly as well as in VS code, as it is somewhat spotty. The main classes of acc,act,& acu seem to work OK but not so much others.
There are two add-ins for Pycharm which have a better reputation. JEDI and KITE. KITE seems to be the better one. Other than that,I don't have any experience with them.
I will be moving to VS code , now that I am aware of it. -- Free
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-21 03:00 PM
Tibor wrote:Hi Tibor,
I've just recorded a video in Visual Studio Code how it works:
https://ttprivatenew.s3.amazonaws.com/pulse/tlorantfy-graphisoft/attachments/14146027/python_script_...
I tried running this code at my end, but I get this error:
Exception has occurred: TypeError elements cannot be initialized with <class 'method'> for propertyValuesOfElement in acc.GetPropertyValuesOfElements(elements, properties):Can you help understand what could be the reason?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-21 03:24 PM
properties =[ acu.GetBuiltInPropertyId("General_ElementID") ] for e in acc.GetPropertyValuesOfElements(elements,properties): for pv in e.propertyValues: print(pv.propertyValue.value)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-21 03:45 PM
UPDATE: Yes, there was a typo-error in acc.GetAllElements
Full code:
from archicad import ACConnection conn = ACConnection.connect() assert conn acc = conn.commands act = conn.types acu = conn.utilities # typo-error in line below, GetAllElements() method: elements = acc.GetAllElements properties = [ acu.GetBuiltInPropertyId("General_ElementID") ] print("\n") for e in acc.GetPropertyValuesOfElements(elements,properties): for pv in e.propertyValues: print(pv.propertyValue.value)Thanks JSN for pointing it out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2020-07-21 04:06 PM
It should be
elements = acc.GetAllElements()