    

 ## On this page

  

 

 # setSourceFromString

 Last update: 16.07.2025 

public [setSourceFromString](set-source-from-string.md)(script: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

Sets the script source code to the given string. The source code is parsed baesd on the current language setting. The script language should be set before calling this function.

#### Parameters

scriptthe source code#### Throws

[ModelCenterException](../-model-center-exception/index.md)