.. _Use Assignment Pattern for Struct Type Variable:

Use Assignment Pattern for Struct Type Variable
===============================================

.. rst-class:: lead

If content assist is triggered when assigning a value to a struct type variable, it will provide an additional **Use assignment pattern** proposal.

Upon choosing it, an assignment pattern with all the fields of the struct being assigned will be created, including fields of internal structs.

Cycle between the placeholder **tbd_val** values with **Tab** to set the fields to your desired values. Press  :kbd:`Enter` to finish setting the values.

.. figure:: ../../images/common/vlogdt-content-assist-struct-assignment-pattern-1.png

.. figure:: ../../images/common/vlogdt-content-assist-struct-assignment-pattern-2.png

Additionally, you can change whether you want the assignment pattern to be multiline or not from :menuselection:`Window --> Preferences --> DVT --> SystemVerilog --> Editor --> Content Assist` in the **Insertion** section. By default, this proposal is written on multiple lines.

.. figure:: ../../images/common/vlogdt-content-assist-struct-assignment-pattern-3.png

.. figure:: ../../images/common/vlogdt-content-assist-struct-assignment-pattern-4.png
