- Author:
- WeiweiAi <wai484@aucklanduni.ac.nz>
- Date:
- 2022-07-01 11:28:26+12:00
- Desc:
- Output states; make the initial values free parameters
- Permanent Source URI:
- https://models.fieldml.org/workspace/8af/rawfile/c7cb5c5262b940160cfb852115ce011b703baeb2/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