Location: Single PASMC model (Gosak et al 2014) @ 165d6a9749bc / Components / txt2cellml.ps1

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-05-03 15:29:19+12:00
Desc:
modify .png to .PNG in README
Permanent Source URI:
https://models.cellml.org/workspace/83f/rawfile/165d6a9749bca1043c54bd058fa1850fee5dbca0/Components/txt2cellml.ps1

## Convert .txt to .cellml
# If this script cannot be loaded, type "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process" in the PowerShell terminal
# The OpenCOR installation folder path
$dpath= 'C:/Users/wai484/Documents/OpenCOR'
# The text file name
$txtfiles="JVOCCi", "JNCXi", "JSERCAi", "JCICRi", "JPMCAi", "Jleaki", "JNKAi","JCli","JKi","Para","Cai","Casr","Vm","PASMC"
# The model directory where .txt and .cellml are saved
$mpath='C:/Users/wai484/Documents/SinglePASMC/Components'
# Execute the command to do the conversion
foreach ($txtfile in $txtfiles)
{
  .$dpath/OpenCOR -c CellMLTextView::export $mpath/$txtfile.txt | out-file $mpath/$txtfile.cellml -encoding utf8
}

$mpath='C:/Users/wai484/Documents/SinglePASMC/Experiments'
.$dpath/OpenCOR -c CellMLTextView::export $mpath/PASMC_test.txt | out-file $mpath/PASMC_test.cellml -encoding utf8