Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » libsbml-development » Problem with libsbml C# bindings.
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Chihiro Okada


Posts: 2
Registered:
May 2009
Problem with libsbml C# bindings. 13 May '09 23:25 Go to previous message

Hello, I'm now trying to create a C# software using SBML.
And I've confronted one problem on libsbml C# bindings (version 3.3.2).

When I try to load particular SBML model with readSBMLFromString function (Code 1),
getModel function returns null. And with readSBML function (Code 2), this problem does not occur.

This problem happened when I used BIOMD0000000012.xml or some other models on BioModels Database.
And I found it did not occur with libsbml python bindings.

Is there someone having the same problem?
Or should I use readSBML function?

Thanks.

// Code 1
public static void TestLoadSBMLFromString(string filename)
{
StreamReader reader = new StreamReader(filename);
string aSbmlString = reader.ReadToEnd();
reader.Close();
SBMLDocument document = libsbml.libsbml.readSBMLFromString(aSbmlString);
Model model = document.getModel();
if (model == null)
{
throw new Exception(string.Format("failed to get model. :{0}", filename));
}
}

// Code 2
public static void TestLoadSBML(string filename)
{
SBMLDocument document = libsbml.libsbml.readSBML(filename);
Model model = document.getModel();
if (model == null)
{
throw new Exception(string.Format("failed to get model. :{0}", filename));
}
}

      

SubjectPosterDate
Read Message   Problem with libsbml C# bindings.  Chihiro Okada13 May '09 23:25
Read Message   Re: Problem with libsbml C# bindings. ajouraku15 May '09 12:03
Read Message   Re: Problem with libsbml C# bindings. Chihiro Okada18 May '09 01:49
Read Message   Re: Problem with libsbml C# bindings. ajouraku20 May '09 03:54
Previous Topic:If there were a pure Java libSBML ...
Next Topic:Ubuntu 9.04 Python 2.6 Site-Packages Directory
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.