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
  • Index
  • » Users
  • » yvaidya
  • » Profile

Posts

Posts

Dec-05-14 15:22:16
Problem loading modelica file
Category: Developer

Thanks Adeas,
I have sorted this problem now. There were few issues:
1. Not using fully qualified domain names for package
2. Package name was not referred correctly in the .mo file and
3. It helps a lot when you use default directory as I think JavaOMC apis has some issues in parsing windows absolute paths.

Kind regards,
Yogi

Dec-04-14 09:20:42
Problem loading modelica file
Category: Developer

Dear all,
I am new to Modelica and JavaOMC Apis. I have two modelica files and I am able to load one file successfully, but not the second. First file starts with
package ABC***
and second has:
within Modelica.Fluid.Examples;
package ABC*** extends Modelica.Icons.ExamplesPackage;

I would like to know, if I have to make any specific method calls/ environment setup before I should parse the second. My brief code is as below

JavaOMCAPI omc = new JavaOMCApi()
omc.getStandardLibrary();
File file = new File(fileName);
if(file.exists() {
   boolean result = omc.loadFile(file.getPath());   //loadFile returns zero for second file
   if(result) {
      String[] packages = omc.getPackages();
   }
}

Please help.

Thanks in advance.


Kind regards,
Yogi

  • Index
  • » Users
  • » yvaidya
  • » Profile
You are here: