Altium Designer Documentation

Working with a String Object on a PCB in Altium Designer

Created: 04.10.2016 | Updated: 20.04.2017


Placed String objects.

Summary

A string is a primitive design object. It places text on the selected layer in a variety of display styles and formats, including popular barcoding standards. As well as user-defined text, a special type of string, referred to as a special string, can be used to display board or system information, or the value of user-parameters, on the board.

Availability

Strings are available for placement in both PCB and PCB Library Editors, by selecting Place » String from the main menu or by clicking the  button in the Wiring toolbar.

Placement

After launching the command, the cursor will change to a cross-hair and you will enter string placement mode. A string will appear "floating" on the cursor:

  1. Position the cursor and click or press Enter to place a string.
  2. Continue placing further strings, or right-click or press Esc to exit placement mode.

Additional actions that can be performed during placement are:

  • Press the Spacebar to rotate the string anti-clockwise or Shift+Spacebar for clockwise rotation. Rotation is in accordance with the value for the Rotation Step, defined on the PCB Editor – General page of the Preferences dialog.
  • Press the X or Y keys to mirror the string along the X-axis or Y-axis respectively.
  • Press the L key to flip the string to the other side of the board.
  • Press the + and - keys (on the numeric keypad) to cycle forward and backward through all visible layers in the design respectively – to change placement layer quickly.
  • Press the Tab key to access an associated properties dialog, from where properties for the string can be changed on-the-fly.
While attributes can be modified during placement (Tab to bring up associated properties dialog), bear in mind that these will become the default settings for further placement unless the Permanent option on the PCB Editor – Defaults page of the Preferences dialog is enabled. When this option is enabled, changes made will affect only the object being placed and subsequent objects placed during the same placement session.

Graphical Editing

This method of editing allows you to select a placed string object directly in the workspace and change its location, rotation, orientation or, in the case of inverted strings, size.

When a non-inverted string object is selected, the following editing handle is available:


A selected String (non-inverted).

  • Click and drag B to rotate the string about point A.
  • Click anywhere on the string – away from any editing handles – and drag to reposition it. The string will be held by point A and can be rotated (Spacebar/Shift+Spacebar) or mirrored (X or Y keys to mirror along the X-axis or Y-axis respectively).

When an inverted string object with an editable bounding rectangle (inverted rectangle) is selected, the following editing handles are available:


A selected String (inverted, and using an inverted rectangle).

  • Click and drag B to rotate the string about point A.
  • Click and drag C to resize the rectangle in the vertical and horizontal directions simultaneously.
  • Click and drag D to resize the rectangle in the vertical and horizontal directions separately.
  • Click anywhere on the string – away from any editing handles – and drag to reposition it. The string will be held by point A and can be rotated (Spacebar/Shift+Spacebar) or mirrored (X or Y keys to mirror along the X-axis or Y-axis respectively).

If attempting to graphically modify an object that has its Locked property enabled, a dialog will appear asking for confirmation to proceed with the edit. If the Protect Locked Objects option is enabled on the PCB Editor – General page of the Preferences dialog, and the Locked option for that design object is enabled as well, then that object cannot be selected or graphically edited. Double click on the locked object directly and disable the Locked property or disable the Protect Locked Objects option, to graphically edit the object.

Non-Graphical Editing

The following methods of non-graphical editing are available:

Editing via an Associated Properties Dialog

Dialog page: String

This method of editing uses the following dialog to modify the properties of a string object.



The String dialog.

The String dialog can be accessed prior to entering placement mode, from the PCB Editor – Defaults page of the Preferences dialog. This allows the default properties for the string object to be changed, which will be applied when placing subsequent strings.

During placement, the dialog can be accessed by pressing the Tab key.

After placement, the dialog can be accessed in one of the following ways:

  • Double-clicking on the placed string object.
  • Placing the cursor over the string object, right-clicking and choosing Properties from the context menu.
  • Selecting the Edit » Change command, then clicking once over the placed string object. This method allows consecutive editing for multiple objects.

Quickly change the units of measurement currently used in the dialog between metric (mm) and imperial (mil) using the Ctrl+Q shortcut. This affects the dialog only and does not change the actual measurement unit employed for the board, as determined by the Measurement Unit setting in the Board Options dialog (Design » Board Options).

Editing via an Inspector Panel

Panel pages: PCB Inspector, PCBLIB Inspector, PCB Filter

An Inspector panel enables the designer to interrogate and edit the properties of one or more design objects in the active document. Used in conjunction with appropriate filtering - by using the PCB Filter panel or the Find Similar Objects dialog - the panel can be used to make changes to multiple objects of the same kind, from one convenient location.

Editing via a List Panel

Panel pages: PCB List, PCBLIB List, PCB Filter

A List panel allows the designer to display design objects from one or more documents in tabular format, enabling quick inspection and modification of object attributes. Used in conjunction with appropriate filtering - by using the PCB Filter panel or the Find Similar Objects dialog - it enables the display of just those objects falling under the scope of the active filter – allowing the designer to target and edit multiple design objects with greater accuracy and efficiency.

Special Strings

While string objects can be used to place user-defined text on the current PCB layer, it's not just user-defined text that can be placed. To assist in producing documentation, the concept of "special strings" is used. These act as placeholders for design, system or user information that is to be displayed on the PCB at the time of output generation.

If a string starts with ".", the entire string is treated as a 'special' string. To include more than one string in a 'special' string, use apostrophe ( ' ) to enclose each string. Example:  '.PcbDoc' '.PcbName'. You can now also use spaces or special characters inside 'special' strings. Example: '.PcbDoc #1'. 

A special string is denoted by the string starting with a . (dot) character (e.g. .Layer_Name, .Net_Count, etc). This syntax is also used when referencing a user-parameter, the parameter name is preceded by the . (dot) character.


Examples of design, system, and design parameter special strings, shown as source strings on the left and converted on the right.

There is a default set of predefined special strings provided for use with new PCB documents. The designer can also add their own custom special strings, by defining additional parameters at the project-level, these parameters are defined in the Parameters Tab of the Options for Project dialog.

The special strings that are available in a PCB document come from a number of sources:

  • A default set of predefined special strings are provided for use with new PCB documents.
  • Custom special strings can be added by defining additional parameters at the project-level – these parameters are defined in the Parameters Tab of the Options for Project dialog.
  • User Parameters added to components in the Schematic domain are transferred via an ECO to become available to PCB components (see the PCB Parameters dialog). If a special string that refers to a component parameter is added to a PCB footprint at the source library level, that string will be interpreted on the target mechanical layer or overlay when the PCB component is placed.


An example of a PCB component special string applied to a component footprint, which interpreted in the PCB Editor space.

Placing a Special String

To use a special string on a PCB, simply place a string object and select one of the special string names from the drop-down. To open the drop-down, start typing in the String text field. Scroll through the drop-down or continue typing to narrow down the options.



Accessing special strings for a placed string object.

Revealing Special Strings in the Workspace

The values of some special strings can only be viewed when the relevant output is generated. Most special strings can be viewed directly on-screen however, by enabling the Convert Special Strings option, on the View Options page of the View Configurations dialog, when viewing the board in 2D (press the L shortcut to open the dialog).


Enabling the Convert Special Strings option allows the data for most of the special strings to be viewed
in the workspace prior to output generation.

PCB Predefined Special Strings

The following are the predefined, system-based special strings available for use on a PCB document:

  • .Application_BuildNumber – the version of the software that the PCB is currently loaded in. When generating Gerber output, use this string to record the software build that the design was created on.
  • .Arc_Count – the number of arcs on the PCB.
  • .Comment – the comment string for a component (placed on any layer in the library editor as part of the component footprint).
  • .Component_Count – the number of components on the PCB.
  • .ComputerName – the name of the computer on which the software is installed and running.
  • .Designator – the designator string for a component (placed on any layer in the library editor as part of the component footprint).
  • .Fill_Count – the number of fills on the PCB.
  • .Hole_Count – the number of drill holes on the PCB.
  • .Item – the Item that the generated data relates to (e.g. D-810-2000). The data will be used to build that Item.
  • .ItemAndRevision – the Item and specific revision of that Item that the generated data relates to, in the format <Item ID>-<Revision ID> (e.g. D-810-2000-01.A.1). The data will be used to build that specific revision of that particular Item.
  • .ItemRevision – the specific revision of the Item that the generated data relates to (e.g. 01.A.1). The data is stored in that Item Revision within the target Altium Vault.
  • .ItemRevisionBase – the Base Level portion of an Item Revision's naming scheme (e.g. 1).
  • .ItemRevisionLevel1 – the Level 1 portion of an Item Revision's naming scheme (e.g. A).
  • .ItemRevisionLevel1AndBase – the Level 1 and Base Level portions of an Item Revision's naming scheme (e.g. A.1).
  • .ItemRevisionLevel2 – the Level 2 portion of an Item Revision's naming scheme (e.g. 01).
  • .ItemRevisionLevel2AndLevel1 – the Level 2 and Level 1 portions of an Item Revision's naming scheme (e.g. 01.A).
  • .Layer_Name – the name of the layer the string is placed on.
  • .Legend – a symbol legend for mechanical drill plots. This string is only valid when placed on the Drill Drawing layer. Note: this is a legacy feature, place a Drill Table object for more detailed drill information.
  • .Net_Count – the total number of different nets on the PCB.
  • .Net_Names_On_Layer – the names of all nets on the specific layer. This string is only valid when placed on an internal plane layer.
  • .Pad_Count – the number of pads on the PCB.
  • .Pattern – the names of the component footprints used on the PCB.
  • .PCBConfigurationName – the name of the data set from which the output has been generated, as defined in the Release view (Project Releaser).
  • .Pcb_File_Name – the path and file name of the PCB document.
  • .Pcb_File_Name_No_Path – the file name of the PCB document.
  • .Plot_File_Name – for generated Gerber output, this string identifies the file name of the Gerber plot file. For printed output, it identifies the layer depicted within the output. For ODB++ output, it identifies the name of the parent folder in which the files are stored.
  • .Poly_Count – the number of polygons on the PCB (consisting of polygon pours, internal planes and split planes).
  • .Print_Date – the date of printing/plotting.
  • .Print_Scale – the printing/plot scale factor.
  • .Print_Time – the time of printing/plotting.
  • .Printout_Name – the name of the printout.
  • .SlotHole_Count – the number of slotted holes on the PCB.
  • .SquareHole_Count – the number of square holes on the PCB.
  • .String_Count – the number of strings on the PCB.
  • .Track_Count – the number of tracks on the PCB.
  • .VariantName - the variant of the design from which the output has been created.
  • .VersionControl_ProjFolderRevNumber – the current revision number of the Project, which is incremented whenever a full commit of the project (i.e. including the project file) is performed. Version control must be used for this string to contain any information.
  • .VersionControl_RevNumber – the current revision number of the document. Version control must be used for this string to contain any information.
  • .Via_Count – the number of vias on the PCB.

Remember that the full list of special strings available in the String dialog will also include any derived from user-defined project-level parameters.

Fonts and Barcodes

The PCB Editor uses TrueType fonts for string objects. In addition, support is available for presenting text strings in Barcode format. Barcodes are commonly used to tag and identify PCBs, streamlining inventory tracking for example, through use of automated scan-machines. Choice of font is made from within the String dialog.

TrueType Fonts

When using TrueType fonts, TrueType and OpenType (a superset of TrueType) fonts found in the \Windows\Fonts folder will be available for use. The feature also offers full Unicode support.

Note that only detected (and uniquely named) root fonts will be available for use. For example, Arial and Arial Black would be available but Arial Bold, Arial Bold Italic, would not.

To use a TrueType font, simply set the Font field (in the String dialog) to TrueType Font and choose a font type from the drop-down field in the Select TrueType Font region. Use the Bold and/or Italic options to add emphasis to the text as required.



The appearance of various example TrueType fonts in the workspace.

Additional options for TrueType fonts are available. Enable the Inverted option to display the text as inverted, with control over the size of the border around the text.


An example of inverted TrueType text.

Embedding TrueType Fonts

The PCB Editor – TrueType Fonts page of the Preferences dialog provides options for embedding TrueType fonts when saving a design and for applying font substitution when loading a design. Embedding fonts is useful when text is required to be displayed in a font that may or may not be available on a target computer upon which the design is loaded. Font substitution enables specification of a TrueType font to be used as a replacement when loading a design where fonts have not been embedded and where fonts may not be available on the computer upon which the design is currently loaded.


TrueType font preferences.

Stroke Fonts

Three Stroke-based fonts are available – DefaultSans Serif and Serif. The Default style is a simple vector font which supports pen plotting and vector photoplotting. The Sans Serif and Serif  fonts are more complex and will slow down vector output generation, such as Gerber.

To use a Stroke-based font, simply enable the Stroke font option in the String dialog and choose a font type from the drop-down field in the Select Stroke Font region.

Resulting appearance of the Default, Sans Serif and Serif Stroke fonts in the workspace.

The Stroke-based fonts are built into the software and cannot be changed. All three fonts have the full IBM extended ASCII character set that supports English and other European languages.

Barcodes

Ability is provided to place barcode symbols directly onto a PCB on any layer, allowing barcodes to be easily imprinted on a PCB as part of the manufacturing process.

To use a Barcode font, simply set the Font field (in the String dialog) to BarCode Text, and define the display options as required in the Select BarCode Text region.

BarCode ISO Code 39 (US Dept of Defense standard) and Code 128 (global trade identification standard) are supported, and the actual text string that the barcode is derived from can also be displayed by enabling the Show Text option.

When showing text, choose a TrueType font to be used, and set the height for the text accordingly.



Example barcode with original (human-readable) text beneath.

Specify the height and width of the barcode using either a desired overall width or a minimum barcode element width to control sizing. Whichever method is used, be sure to use sizing that will render the barcode readable to the appropriate scanners!

By using a combination of barcode and inverted text strings, along with fills if necessary, a nice barcode area can be defined on a board, with more information textually than would otherwise be afforded by just the originating barcode text.


Example using inverted barcode and additional inverted text strings.

Обнаружили проблему в этом документе? Выделите область и нажмите Ctrl+Enter, чтобы оповестить нас.

Связаться с нами

Связаться с нашими Представительствами напрямую

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
200 characters remaining
Вы сообщаете о проблеме, связанной со следующим выделенным текстом
и/или изображением в активном документе:
Бесплатная пробная версия Altium Designer
Бесплатная пробная версия Altium Designer
Давайте приступим. Для начала, Вы или Ваше предприятие уже используете Altium Designer?

Если Вы хотите поговорить с представителем, пожалуйста, свяжитесь с местным офисом Altium.
Copyright © 2019 Altium Limited

В таком случае, для чего Вам необходима пробная лицензия?

Если Вы хотите поговорить с представителем, пожалуйста, свяжитесь с местным офисом Altium.
Copyright © 2019 Altium Limited

Вам для этого не нужна пробная лицензия.

Нажмите кнопку ниже, чтобы загрузить установщик самой новой версии Altium Designer

Загрузить установщик Altium Designer

Если Вы хотите поговорить с представителем, пожалуйста, свяжитесь с местным офисом Altium.
Copyright © 2019 Altium Limited

Пожалуйста, заполните форму ниже, чтобы получить ценовое предложение.

Нажимая [Получить бесплатнную пробную версию], Вы соглашаетесь с нашей Политикой конфиденциальности. Вам могут приходить сообщения от компании Altium, и Вы можете изменить настройки уведомлений в любой момент.

Если Ваша подписка Altium активна, у Вас нет необходимости в пробной лицензии.

Если у Вас нет активной подписки Altium, пожалуйста, заполните форму ниже, чтобы получить пробную версию.

Нажимая [Получить бесплатнную пробную версию], Вы соглашаетесь с нашей Политикой конфиденциальности. Вам могут приходить сообщения от компании Altium, и Вы можете изменить настройки уведомлений в любой момент.

Для чего Вы хотите попробовать Altium Designer?

Если Вы хотите поговорить с представителем, пожалуйста, свяжитесь с местным офисом Altium.
Copyright © 2019 Altium Limited

Вы нашли нужное место! Пожалуйста, заполните форму ниже, чтобы начать использование пробной версии.

Нажимая [Получить бесплатнную пробную версию], Вы соглашаетесь с нашей Политикой конфиденциальности. Вам могут приходить сообщения от компании Altium, и Вы можете изменить настройки уведомлений в любой момент.

Great News!

Valid students can get their very own 6-month Altium Designer Student License for FREE! Just fill out the form below to request your Student License today.

Нажимая [Получить бесплатнную пробную версию], Вы соглашаетесь с нашей Политикой конфиденциальности. Вам могут приходить сообщения от компании Altium, и Вы можете изменить настройки уведомлений в любой момент.

Вы можете загрузить бесплатную лицензию средства просмотра Altium Designer Viewer сроком действия 6 месяцев.

Пожалуйста, заполните форму ниже, чтобы запросить эту лицензию.

Нажимая [Получить бесплатнную пробную версию], Вы соглашаетесь с нашей Политикой конфиденциальности. Вам могут приходить сообщения от компании Altium, и Вы можете изменить настройки уведомлений в любой момент.

Замечательно! Создавать новое - отличное занятие. У нас есть превосходная программа для Вас.

Upverter - бесплатная платформа, разработанная специально для любителей проектирования.

Нажмите здесь, чтобы попробовать!

Если Вы хотите поговорить с представителем, пожалуйста, свяжитесь с местным офисом Altium.
Copyright © 2019 Altium Limited

Вы можете загрузить бесплатную лицензию средства просмотра Altium Designer Viewer сроком действия 6 месяцев.

Пожалуйста, заполните форму ниже, чтобы запросить эту лицензию.

Нажимая [Получить бесплатнную пробную версию], Вы соглашаетесь с нашей Политикой конфиденциальности. Вам могут приходить сообщения от компании Altium, и Вы можете изменить настройки уведомлений в любой момент.