Author Topic: Examples  (Read 13682 times)

Offline eirirs

  • Newbie
  • *
  • Posts: 2
    • View Profile
Examples
« on: November 04, 2011, 14:06:09 »
Hi

I got a oobn file, which I opened in hugin developer, and used the generate code function so I can integrate the code in my project. However I gets lots of errors. Am I supposed to write the code for Hugin bbn from scratch? What are the code generator really making? isn't it a function for creating bbn for copypaste into project?

I would love to get some working examples with code pasted from hugin developer to study.

Thanks on advance

Eirik

Offline eirirs

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Examples
« Reply #1 on: November 04, 2011, 14:10:04 »
Or am I supposed to be able to load the .oobn file in Java and interact with it and SQL db? I can't find any example about it.

E

Offline Anders L Madsen

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 2295
    • View Profile
Re: Examples
« Reply #2 on: November 05, 2011, 20:53:33 »
The "Test" directory of the HUGIN software installation contains a number of examples. LoadAndPropagate illustrates how to load a HUGIN model from file. The LoadAndPropagate example loads a model saved in ".net" file format.

Unless you are using object-oriented features (e.g., instance nodes), then you can safely saved your model as a ".net" file and use LoadAndPropagate as a skeleton for your code.

If your are using object-oriented features, then you need to use the method "parseClasses" into a class collection in order to load models from ".oobn" files.

These posts may help you:

http://forum.hugin.com/index.php?topic=133.0
http://forum.hugin.com/index.php?topic=255.0
HUGIN EXPERT A/S