We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2020-07-19 09:27 PM - last edited on 2021-09-15 10:34 AM by Noemi Balogh
Solved! Go to Solution.
2020-07-20 09:45 AM
2020-07-20 09:45 AM
2020-07-20 01:09 PM
2020-07-20 02:16 PM
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?
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
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_...
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?
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)
2020-07-21 03:45 PM
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.
2020-07-21 04:06 PM
elements = acc.GetAllElements()