2022-07-27 08:34 AM
Hi!
I just stared studying Archicad module for Python and I'm not sure if it's my fault but I can't construct new properties.
from Archicad import ACConnection
conn = ACConnection.connect()
assert conn
acc=conn.commands
act=conn.types
acu=conn.utilities
group_test = act.PropertyGroup("__Test Group__")
prop_test=act.PropertyDefinition(group_test, "__Test New Property__", "an expectant trial")
print(prop_test)
the result seems to be interesting if I take a look at the Python Palette:
But in the end no property is created...
Am I wrong somewhere?
Many thanks!
Solved! Go to Solution.
2022-07-28 01:40 AM - edited 2022-07-28 01:40 AM
Hi!
With your script you only created python objects of the classes "PropertyGroup" and "PropertyDefinition". I think that there are unfortunately no Python/JSON command to create Properties in Archicad.
I think only values of properties can be changed via the Python interface. (https://archicadapi.Graphisoft.com/JSONInterfaceDocumentation/#SetPropertyValuesOfElements)
Best, Bernd
2022-07-28 01:40 AM - edited 2022-07-28 01:40 AM
Hi!
With your script you only created python objects of the classes "PropertyGroup" and "PropertyDefinition". I think that there are unfortunately no Python/JSON command to create Properties in Archicad.
I think only values of properties can be changed via the Python interface. (https://archicadapi.Graphisoft.com/JSONInterfaceDocumentation/#SetPropertyValuesOfElements)
Best, Bernd