Hi,
How can I get an attribute's value from the project's settings ?
(@828@ for example)
Best
Christophe
Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.
Melden Sie sich jetzt an und diskutieren Sie mit!
Hi,
How can I get an attribute's value from the project's settings ?
(@828@ for example)
Best
Christophe
Hi,
Works great
attributes = AllplanBaseElements.ProjectAttributeService.GetAttributesFromCurrentProject()
for attribute in attributes:
if attribute[0]== 828:
build_ele.Test.value = attribute[1]
Thanks
Hi,
you can use ProjectAttributeService (NemAll_Python_BaseElements).
Please have a look at the API documentation, located in the folder ...\etc\PythonPartsFramework\InterfaceDoc.
Best regards
Horst
Hi,
Thanks for your reply but I'd like to have more informations about the right way to use it :
build_ele.MyValue.value = AllplanBaseElements.ProjectAttributeService.GetAttributesFromCurrentProject(828) ?
Christophe
Hi,
you get all project attributes by the call
attributes = AllplanBaseElements.ProjectAttributeService.GetAttributesFromCurrentProject() for attribute in attributes: print(attribute)
Please have a look at the example ProjectAttributesInteractor.pyp/py
Best regards
Horst
Hi,
Works great
attributes = AllplanBaseElements.ProjectAttributeService.GetAttributesFromCurrentProject()
for attribute in attributes:
if attribute[0]== 828:
build_ele.Test.value = attribute[1]
Thanks