Location: ECC_MSK (Rios et al. 1993) @ 1b1a07491a4d / Components / buildsrc / txt2cellml.ps1

Author:
WeiweiAi <wai484@aucklanduni.ac.nz>
Date:
2022-07-28 12:05:55+12:00
Desc:
Fixed the link
Permanent Source URI:
https://models.physiomeproject.org/workspace/8af/rawfile/1b1a07491a4d102536a3f7e25957ca2810d6ed76/Components/buildsrc/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="Para","C0_S2","CN_S2","C_S3","O0_S2","ON_S2","O_S3","MWC_10","MWC_18"
# The model directory where .txt files are saved
$tpath='C:/Users/wai484/Documents/ECC_MSK_Rios_1993/Components/buildsrc'
# The model directory where .cellml files are saved
$cpath='C:/Users/wai484/Documents/ECC_MSK_Rios_1993/Components'
# Execute the command to do the conversion
foreach ($txtfile in $txtfiles)
{
  .$dpath/OpenCOR -c CellMLTextView::export $tpath/$txtfile.txt | out-file $cpath/$txtfile.cellml -encoding utf8
}
$txtfile="MWC_10_test"
$cpath='C:/Users/wai484/Documents/ECC_MSK_Rios_1993/Experiments'
.$dpath/OpenCOR -c CellMLTextView::export $tpath/$txtfile.txt | out-file $cpath/$txtfile.cellml -encoding utf8
$txtfile="MWC_18_test"
$cpath='C:/Users/wai484/Documents/ECC_MSK_Rios_1993/Experiments'
.$dpath/OpenCOR -c CellMLTextView::export $tpath/$txtfile.txt | out-file $cpath/$txtfile.cellml -encoding utf8