Das Wissen aller Anwender nutzen

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.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

[Frage] Controling *.pyp files from Python?

Schlagworte:

Is it possible to control data in pallets from python code. For instance you have many elements where data are similar and you would like to handle such things in python script, instead of doing a lot of repetitive work and manually enter values into palettes. This would be very useful thing to do!
Is it any way to achieve this?

Thanks for any suggestion.
Primoz

* save data from palette to json file :
data = {}
data['Elevation'] = self.build_ele.Elevation.value
json.dump(data, f)

* load setting data form json file to pallete :
self.build_ele.Elevation.value = data['Elevation']
self.palette_service.update_palette(0, False) #update to pallete

you can learn json file in link : https://www.w3schools.com/python/python_json.asp


https://campus.allplan.com/ verwendet Cookies  -  Mehr Informationen

Akzeptieren