A list for the developers of CellML tools

Text archives Help


[cellml-dev] creating MapVariables


Chronological Thread 
  • From: lpsmith at spod-central.org (Lucian Smith)
  • Subject: [cellml-dev] creating MapVariables
  • Date: Thu, 8 Jul 2010 00:33:52 +0100

So, I am now embarking on attempting to *create* CellML using the API. I
know, I know, heady stuff. But I think it can be done.

My first foray into this is to try to create connections. I can create a
connection with 'createConnection' on the Model object, which claims it
also creates a MapComponents, which I presume I can access by getting the
MapComponents from the newly-created Connection. I can create a single
MapVariables with createMapVariables from the Model object, but here I am
stuck. How do I get that MapVariables into a Connection? The Connection
has a MapVariablesSet, but that seems to be an iterator, and there's no
'createMapVariablesSet' anywhere.

Also, I am unsure what is going to happen if I set the names of these
MapComponents and MapVariables elements vs. setting the objects in
question vs. setting them both. Will all three options work? Will only
one option work? Right now I am doing it with names
(SetFirstComponentName) and am hoping that this will at least create the
CellML XML that I need, even if I can't correctly call 'GetFirstComponent'
afterwards. The documentation for MapVariables talks about setting
things, but the documentation for MapComponents only talks about getting.

-Lucian




Archive powered by MHonArc 2.6.18.

Top of page