Message Boards Message Boards

0
|
4837 Views
|
1 Reply
|
6 Total Likes
View groups...
Share
Share this post:

Preserve SystemModeler generated source files?

Posted 6 years ago

Is it possible to configure SystemModeler to preserve the output source files? By default it generates the source and then purges the files after compilation.

POSTED BY: natehollis

Rate this as good.

Nate,

The easiest way to do this is to use an undocumented feature. Type

setExpertMode(true)

into the Kernel Command window and restart SystemModeler. This puts WSM into "Expert Mode". In Expert mode a new menu item will appear in the SimulationCenter: File->Export->Source Code.

Export your source code. Note that the Makefile will delete the source files after a make so I suggest editing it and removing the line:

rm -f $(SRCFILES)

or you can do a "make noclean" which will have the same affect.

Warning: Expert mode has undocumented and experimental features and changes the look of the Class Browser. The enabled features are not guaranteed to work and are not guaranteed to remain consistent in future versions. You may want to turn it off after you export your code (although I, personally, have found no harm leaving it on because I use that source code export feature periodically.) Just be aware of the experimental nature of the enabled features.

Regards,

Neil

POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract