ansys.scade.apitools.prop.pragma.set_pragma_json#
- ansys.scade.apitools.prop.pragma.set_pragma_json(object_: scade.model.suite.Object, id: str, data: object) bool#
Serialize a Python object to a JSON document in a textual pragma.
An existing pragma with the same ID is updated with the text or deleted if the object is
Noneor empty.See the pragma_json example.
Parameters#
- object_suite.Object
Element to attach the pragma to.
- idstr
ID of the pragma.
- dataobject
Python object to serialize to a JSON document.
Returns#
- bool
Trueif the object is modified,Falseotherwise.