Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

OMC - partial support for Modelica 3.1 annotations - HowTo Fix?

OMC - partial support for Modelica 3.1 annotations - HowTo Fix?

Hello,

I am trying to include extra annotations in my Modelica models and trying to query and modify this information using OMC. However, as of the latest OpenModelica relase 1.8, the functions that return annotations like getComponentAnnotations and others do no do so completely.

For example, an annotation containing "Dialog(xyz) " when queried returns "Dialog(error)". The contents are not parsed or understood so they are skipped.

Anyway, what I want to do is the following and I would be grateful for any help as this feature is important for my project and I need to have it working ASAP.

What I want to do is modify the OMC Metamodelica code. Probably create a new function called getComponents2 that acts like the old getComponents function but adds one more item to its returnn list and that is the annotation string. Or better, create a functoin getNthComponentAnnotations2 that returns the full annotation without trying to parse its contents. I have written a parser in Python that handles annotations. So, I just need the annotation string in full.

So, simple question, how to I modify the OMC so as to get the full Annotation string of a component?
Which files should I be modifying, etc.

Also, I am currently getting familiar with the OMC developer documentation available of course.

Best regards

Chahé

Re: OMC - partial support for Modelica 3.1 annotations - HowTo Fix?

Status update:
- the OpenModelica System documentation version 2011-11-25 sections A.5 and B.5 provide the starting point for my problem: how to add a new API to the OMC and what files to modify

There are 0 guests and 0 other users also viewing this topic
You are here: