I have noticed that .PLECS files (standalone) are human readable and that they contain the info of everything within the model. I’m thrilled that this is the case, but the syntax doesn’t seem to conform to JSON or XML, so I was wondering if it is a custom format? I was hoping that it would be standard in some way so I can use an off-the-shelf parser to navigate the model tree and pull out certain pieces of information. I can write something to parse a .plecs file if I really have to but it would be lovely if something already existed. I’m planning on using python for this task if that matters at all.
Yes, it’s a custom format and no, I’m not aware of any off-the-shelf parser that allows you to parse the model. Since it is human readable you can easily write your own, if you really have to. Please be aware, though, that we may add new syntax elements or change the format completely at any time.
Kind regards,
Oliver Schwartaz
Hi
Im doing one to read out the parameter of initialization and use it to create a class in python for my model. what you need exactly? Otherwise I agree with oliver that is better to use the API
Another useful way to use directly the change of code is adding complex probe content, like 20-30 probe signals that have the same name, but maybe is only my need
Thanks for the offer, but shortly after receiving the selected answer I wrote my own parser to walk the model tree and grab the data that I wanted. I use the API when possible, but the API doesn’t offer everything. In this instance I wanted to collect all the paths to scopes into a list of scope objects, but there are other things I use it for as well.