Tips & Tricks

Set Up Your Drawing Right: XLINE, RAY and Locked Reference Layers

Build a cleaner CAD workflow with XLINE and RAY reference geometry, dedicated construction layers and layer locking.

Level
Intermediate
Best for
New projects, grids and reference geometry

A well-organised CAD project should begin with reference geometry, not with walls, machines or details. Establishing important axes, alignments and construction lines first gives the rest of the drawing a reliable framework. In GstarCAD, XLINE and RAY are ideal for this because they remain useful as references regardless of how far the project develops. Put them on a dedicated layer, lock that layer when the setup is complete, and you have a reference system that stays visible without constantly getting selected, moved or deleted by accident.

Why use construction geometry instead of ordinary lines?

A normal LINE has two endpoints and is usually part of the actual drawing. Construction geometry has a different purpose: it provides alignment references that help you position real objects accurately.

ObjectGeometryBest use
LINEFinite between two pointsActual drawing geometry
RAYStarts at one point and continues infinitely in one directionDirectional alignment from a known origin
XLINEContinues infinitely in both directionsAxes, grids, centre lines and construction references

The main advantage of XLINE is that you do not have to guess how long the reference line should be. It remains available across the drawing and can be used for object snaps and intersections wherever needed.

Start the project with a dedicated reference layer

Before creating your axes, create a dedicated layer for construction geometry. Depending on your company standard, this might be named something such as GRID, AXES or CONSTRUCTION.

The important point is not the exact name but the separation: permanent project geometry should not share a layer with temporary or reference geometry.

  1. Create a dedicated layer for axes and construction references.
  2. Assign it a clearly recognisable colour and appropriate linetype.
  3. Make the reference layer current.
  4. Create the main construction geometry.
  5. Switch back to your normal working layer.
  6. Lock the reference layer before detailed drafting begins.

Tip

If your construction geometry should never appear on final drawings, control plotting for that layer separately. If the axes are part of the final documentation, keep construction references and final plotted grid objects on separate layers.

How do you create a project grid with XLINE?

XLINE is especially useful for structural grids, building axes and machine centre lines. It includes options for horizontal, vertical and angled construction lines as well as bisectors and offsets.

Command: XLINE ↵
Specify a point or [Hor/Ver/Ang/Bisect/Offset]: V ↵
Specify through point: pick grid position

After creating the first axis, the Offset option can be particularly useful for regularly spaced grids. Instead of drawing a series of finite lines and extending them later, establish the complete reference grid first and build the project around its intersections.

Horizontal and vertical XLINE objects are useful for conventional building grids, while the Angle option is useful when part of a building, façade or mechanical arrangement follows a rotated alignment.

When is RAY better than XLINE?

Use RAY when the reference has a meaningful starting point but only needs to continue in one direction. A ray starts at a defined point and extends infinitely through the direction you specify.

  1. Type RAY and press Enter.
  2. Specify the starting point.
  3. Specify a second point to define the direction.
  4. Press Enter when finished.

This can be useful for a site alignment starting from a survey point, a façade direction extending from a building corner, a roof or ramp direction, or any reference where the origin matters and extending backwards would only create unnecessary construction geometry.

A simple rule is: use XLINE for an axis and RAY for a direction from a point.

Why should you lock the reference layer?

Once your project axes are correct, they should become stable reference geometry. If they remain fully editable, a selection window, stretch operation or accidental grip edit can move a critical axis without you noticing immediately.

Use LAYLCK to lock the layer simply by selecting an object on it.

Command: LAYLCK ↵
Select an object on the layer to be locked: select axis

The construction geometry remains visible and available as a reference, but objects on the locked layer cannot be modified accidentally. When a legitimate change is required, use LAYULK and select an object on the layer to unlock it again.

Watch out

Switch to your normal working layer before locking the reference layer. GstarCAD allows new objects to be created on a locked layer if that layer is still current, so changing the current layer first helps keep project geometry organised.

Practical example: setting up a structural floor plan

Suppose a building has five vertical structural axes spaced at 6000 mm and four horizontal axes spaced at 7500 mm. Instead of drawing walls first and trying to maintain the spacing manually, establish the reference grid before any detailed geometry.

Create the first vertical and horizontal axes with XLINE, then generate the remaining grid positions using the Offset option. Place column centres, wall centre lines and other important elements using the intersections of these construction lines.

If an entrance canopy extends from one grid intersection at a specific angle, use RAY from that intersection to establish its direction.

Once the axes have been checked, switch to the appropriate working layer and use LAYLCK on the reference layer. You can now snap to the grid throughout the project without risking an accidental movement of the underlying coordinate framework.

How can layer isolation help on larger projects?

As the drawing becomes more complex, the same layer strategy continues to help. LAYISO can temporarily isolate the layers of selected objects so you can concentrate on a particular part of the project. Its settings can also keep other layers visible but locked and faded instead of turning them completely off.

When the focused edit is complete, use LAYUNISO to restore the previous layer state.

This creates a useful progression: construct the reference system, lock it, isolate the geometry you are currently working on, then restore the complete drawing when finished.

What is the best project setup workflow?

A reliable project should have a hierarchy. First establish the geometry that everything else depends on. Use XLINE for permanent axes and grids, RAY for directional references from known points, and keep this construction geometry on dedicated layers.

Once the references are verified, lock them and draft the actual project on separate working layers. This small amount of organisation at the beginning can prevent misplaced walls, shifted grids and accidental reference edits later in the project. The goal is simple: build a stable framework first, then let the rest of the drawing snap to it.

All tips Updated 29 September 2026
Continue learning
View all tips

Ready to switch to GstarCAD?

Get personalized advice on licensing, migration, and deployment for your business.

Contact us Buy now

No obligation — reply within 24h

Your Cart

Subtotal

Price does not include local taxes or duties.

Proceed to Checkout

Cookie preferences

Choose which cookies you want to allow. Essential and payment cookies cannot be disabled as they are required for the site to function.

Essential

Required

Core functionality including authentication, shopping cart, and language preferences.

Payment

Required

Required for processing payments securely through Stripe and PayPal.

Analytics

Help us understand how visitors interact with our site to improve the experience.

Marketing

Used to deliver relevant advertisements and measure campaign performance.

Functional

Order attribution and traffic source tracking to help us understand how customers find our store.