astah* API User Guide


[How to Handle Project]

  1. Getting ProjectAccessor
  2. Opening Project
  3. Closing Project
  4. Creating Project
  5. Saving Project
  6. Saving Project in another name
  7. Getting an original model of Project
Please refer to astah* API JavaDoc for details of Interfaces and methods.

[ProjectAccessor]

By using ProjectAccessor, execute the following operations : open/close/save/save as/input XMI/output XMI/configure reference model/easy merge/search models.

[Getting ProjectAccessor]

Use getProjectAccessor method of AstahAPI class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.open("C:\\test.asta");
    prjAccessor.close();

[Opening Project]

Use open method of ProjectAccessor class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.open("C:\\test.asta");
    prjAccessor.close();

[Closing astah* Project]

Use close method of ProjectAccessor class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.open("C:\\test.asta");
    prjAccessor.close();

[creating Project]

Use create method of ProjectAccessor class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.create("C:\\test.asta");
    prjAccessor.close();

[Saving project]

Use save method of ProjectAccessor class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.create("C:\\test.asta");
    prjAccessor.save();
    prjAccessor.close();

[Saving Project in another name]

Use saveAs method of ProjectAccessor class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.create("C:\\test.asta");
    prjAccessor.saveAs("C:\\test2.asta");
    prjAccessor.close();

[Getting an original model of Project]

Use getProject method of ProjectAccessor class.

Sample

    ProjectAccessor prjAccessor = AstahAPI.getAstahAPI().getProjectAccessor();
    prjAccessor.create("C:\\test.asta");
    IModel model = prjAccessor.getProject();
    prjAccessor.saveAs("C:\\test2.asta");
    prjAccessor.close();


Home