Message Boards Message Boards

0
|
5283 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Creating library with Directory structure

Posted 9 years ago

Is there a way for SystemModeler to create new packages as a directory of folders? I wish to create a large library which will be organized as a directory, where the sub-moels will be saved in a named folder. This is done to avoid having the library saved as an single unwieldy file, and to allow the use of Source control.

It seems as though SystemModeler will only create new packages as a single file, unless I manually modify the package code. In other programs (Dymola) this is done automatically by un-selecting a check-box (store packages as a single file). If there is no automatic way to do this, then all model and package files will have to be created outside of SystemModeler. Please let me know if anything needs clarification. Basically, I want to generate "Directory Storage" as specified in the "Package Definitions" page of the SystemModeler Documentation center: wsm:///ref/ModelicaByExample/components/packages/package_def/index.html

I appreciate any help.

POSTED BY: Chris Doherty
2 Replies
Posted 9 years ago

There is currently no support (but it will be available in a future version) for creating the directory storage from the graphical user interface. If you start up your project by manually creating the directory structure, e.g.:

/RootPackage               # Top-level package stored as a directory
  package.mo               # Indicates this directory is a package
  package.order            # Specifies an ordering for this package
  NestedPackageAsFile.mo   # Definitions stored in one file
  /NestedPackageAsDir      # Nested package stored as a directory
    package.mo             # Indicates this directory is a package
    package.order          # Specifies an ordering for this package

You can then edit and save these classes from SystemModeler and they will be saved to the corresponding files and directories.

POSTED BY: Johan Rhodin
Posted 9 years ago

OK. Thanks for the reply.

POSTED BY: Chris Doherty
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