[Frage] Controling *.pyp files from Python?

Schlagworte:
  • Allplan!

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