Skip to main content

ModelCenter scriptWrapper API 2026 R1

Interface: ParseableFile

Last update: 22.06.2026

Package: com.phoenix_int.aserver.util.scriptwrapper.api

All Known Subinterfaces:

InputFile, OutputFile

All Known Implementing Classes:

AbstractFile, CAEOutputFile, PHXRowFieldFile, XPathFile


Declaration:

public interface ParseableFile

Interface for files (not file variables) used in script wrappers

Nested Class Summary

Modifier and Type Interface and Description
static class ParseableFile.Mode
File mode. Moved to type-safe enum from legacy integer constants

Method Summary

Modifier and Type Method and Description
void backup()
Backup the file on disk.
void close()
Close the file and free up resources
void delete()
Delete the file from disk.
void readTemplate()
Read the template.
void setFileToGenerateOrParse(java.lang.String fileName)
Set the file to generate or to parse, depending on the mode
void setTempEmbedded(java.lang.String option)
This method applies only to ModelCenter and has no function in ModelCenter Remote Execution
void setTemplateFile(java.lang.String templateFileName)
Set the template file to read.
void setVariable(java.lang.String name, java.lang.String value)
Sets the value of a variable

Method Detail

backup

void backup()

Backup the file on disk. File is at the same location with ".bac" appended to the end. If a file by that name already exists, it is deleted prior to moving.

close

void close()

Close the file and free up resources

delete

void delete()

Delete the file from disk.

readTemplate

void readTemplate()
           throws java.io.IOException,
                  com.phoenix_int.aserver.util.PHXInvalidFormatException,
                  PHXNoSuchTokenException,
                  java.lang.IllegalAccessException,
                  java.lang.InstantiationException,
                  PHXNumberFormatException,
                  PHXBookmarkNotFoundException,
                  PHXSectionNotFoundException

Read the template. In MCRE 7.1, this method was changed to never throw any exceptions. Reading the templates allows you to fill in default values if you can, but is not mandatory.

Throws:

setFileToGenerateOrParse

void setFileToGenerateOrParse(java.lang.String fileName)

Set the file to generate or to parse, depending on the mode

Parameters:

  • fileName -

setTempEmbedded

void setTempEmbedded(java.lang.String option)

This method applies only to ModelCenter and has no function in ModelCenter Remote Execution

setTemplateFile

void setTemplateFile(java.lang.String templateFileName)

Set the template file to read. If the template file is not specified, it defaults to the file that is parsed or generated, for Mode.PARSE or Mode.GENERATE, respectively.

Parameters:

  • templateFileName - file name

setVariable

void setVariable(java.lang.String name,
                 java.lang.String value)
          throws PHXNoSuchObjectException

Sets the value of a variable

Parameters:

  • name - variable name
  • value - variable value as a string

Throws:

  • PHXNoSuchObjectException

Connect with Ansys