Luna Modeler is a powerful data modeling tool designed to make the visualization of database structures clear and intuitive. One of its key features is the Layout function, which automatically arranges objects within your diagrams.

Understanding the Layout Function
In Luna Modeler, there are five distinct layout types, each serving a different purpose:
Optimal Layout
The Optimal layout takes into account the diagram settings you’ve configured (incl. Display Relationships, Display Dependencies, Display Lines, Line Mode etc.). As a result, it strikes a balance between readability and logical structure, making it a versatile option for everyday modeling.
Relationships Layout
In contrast, the Relationships layout places the greatest emphasis on the display of relationships between tables. It organizes tables in a way that makes foreign keys better visible. Therefore, this layout is especially useful when you need to analyze the structure and focus on database tables and relationships.

Dependencies Layout
Similarly, the Dependencies layout focuses on dependencies between objects such as views, functions, procedures, and database tables. By using this layout, you can quickly understand how different database components rely on one another.

Lines Layout
The Lines layout arranges objects with an emphasis on lines, ideally when you turn off the display of relationships and dependencies.

Grid Layout
Finally, the Grid layout arranges objects in a clean, grid-like structure. This option is ideal if you prefer order and symmetry, or when you are preparing diagrams for presentations and documentation.

By switching between these layouts, you can tailor the visualization of your data models to match your current goals – whether that means clarifying relationships, tracking dependencies, or simply keeping diagrams neat and organized.
Custom Layout and Settings
In addition to predefined layouts, Luna Modeler also offers the Custom Layout and Settings feature. Unlike the automatic options, this feature gives you the flexibility to arrange objects in diagrams based on your own preferences. Consequently, you gain much greater control over how your models are displayed.

The available settings are divided into three main sections:
Settings for all layouts
- Spacing: Adjust the spacing between objects, ranging from extra small to extra large.
- Ignore notes and texts: When enabled, notes and text elements remain in their original positions instead of being re-positioned.
- Group by schema: Automatically groups objects according to their schema.
- Subject area by schema: Creates subject areas for schemas to make the structure clearer.
Diagram settings affecting layout
- Line mode: Instantly changes the line mode; you can select either detailed or straight line mode.
- Display relationships: Instantly shows or hides relationship lines.
- Display dependencies: Instantly shows or hides dependency lines.
- Display lines: Instantly shows or hides lines in the diagram.
Layout type to execute
- Layout: Defines which layout type should be applied when executing the arrangement.
Additional Features
Moreover, the options from Settings for all layouts and Layout type to execute are also applied when performing additional operations, such as adding objects to a new sub-diagram or running reverse engineering.
With Custom Layout and Settings, you are not limited to automation – you can also refine diagrams to suit your personal workflow, analytical tasks, or presentation needs.
#