FMU and MotionSolve

How do I avoid using an absolute file path with FMU and MotionSolve blocks?

Use a relative path

FMU and MotionSolve blocks, as well as other blocks that require file inputs, support the use of a relative path, meaning that the input file is always relative to the current model .scm file.

How do I avoid using an absolute file path in an Activate context to a local file?

In the model initialization or model context, obtain the current model directory with this command:

d = fileparts(bdeGetCurrentModelFilePath)

For example, if the model is located here: C:/work/model1.scm, the above command stores C:/work in the d variable.