0
$\begingroup$

I have a program written with Mathematica, splitted in several .m files which are loaded at runtime using the Get command. Using Mathematica it runs fine but when I try to run Get["something.m"] with CDF Player Pro from a .cdf-file it just returns $Failed.

Is it even possible to load and run seperate .m or .nb files using the CDF Player (Pro) via the Get command?

$\endgroup$
3
  • $\begingroup$ Yes, it is possible. $\endgroup$ Commented Oct 11, 2019 at 15:05
  • $\begingroup$ @RolfMertig Then do you have a clue why running Get fails using CDF Player but works using Mathematica? Do you have any source that says that it should work? $\endgroup$
    – SimonH
    Commented Oct 14, 2019 at 8:34
  • $\begingroup$ $Path may be different. You can also work with SetDirectory[NotebookDirectory@EvaluationNotebook[]] before using Get. You could also post a minimal working example here. Or send this to Wolfram support. $\endgroup$ Commented Oct 15, 2019 at 20:11

1 Answer 1

0
$\begingroup$

I finally contacted the Support. Apparently the CDF Player can only load files using the Get command which are inside its installation directory. I copied my program into

C:\Program Files\Wolfram Research\Wolfram CDF Player\11.3\AddOns\Applications\MyApp

which works fine now. I wish there was some documentation with information like this...

$\endgroup$
2
  • $\begingroup$ So Free Player or Player Pro? For the latter it is not true, it can Import/Export whatever you want. Just make sure you the file is on path or add full path. $\endgroup$
    – Kuba
    Commented Oct 29, 2019 at 11:17
  • $\begingroup$ @Kuba Player Pro. Yes, Import and Export do work but Get does not when the file you want to load is not inside the installation directory. These are completely different methods anyway. I edited my answer to clarify it's about the Get command and not about Import/Export. $\endgroup$
    – SimonH
    Commented Oct 29, 2019 at 12:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.