Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.1.0 - Русский


%MODELICA_USER_LIBS

Specify the paths of the directories containing the Modelica class definition files

Description

This variable is used to specify where are the Modelica class definition files

If the user wants to define his own Modelica blocks, Modelica files describing the blocks must be indicated. The variable %MODELICA_USER_LIBS has to be declared as global before launching Xcos.

Example

// Get the current Modelica path and directory
[modelica_path, modelica_directory] = getModelicaPath()

// To define user's Modelica blocks
// path of the directory containing the user's Modelica files
// It has to be global to be accessed from Atoms toolbox
global %MODELICA_USER_LIBS
%MODELICA_USER_LIBS = SCI + "/modules/xcos/modelica_library";

// Launch Xcos
xcos();
// Load the diagram with Modelica blocks

[modelica_path, modelica_directory] = getModelicaPath()

// To add another Modelica folder
%MODELICA_USER_LIBS = [%MODELICA_USER_LIBS , SCI + "/modules/xcos/my_modelica_blocks/Electrical_network"];

// Launch Xcos
xcos();
// Load the diagram with Modelica blocks

[modelica_path, modelica_directory] = getModelicaPath()

See also

  • getModelicaPath — Get the Modelica directory path needed by Xcos diagram containing Modelica blocks
Report an issue
<< Scilab Utilities Functions Scilab Utilities Functions block_parameter_error >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon May 22 12:41:18 CEST 2023