Diálogo Buscar y reemplazar (Transformación de fuente de datos) |
Utilice el cuadro de diálogo Buscar y reemplazar para crear, modificar y probar acciones para la transformación de búsqueda y reemplazo. Puede abrir este cuadro de diálogo utilizando uno de los métodos siguientes:
Haga clic en , situado junto a la opción Buscar y reemplazar de la ficha Transforma de la página de propiedades Origen de datos.
Haga clic en , situado junto a la opción Buscar y reemplazar de la página de propiedades Legible.
Depending on what kind of transform you want to perform, the action can consist of the text to be searched for; instructions to insert, replace, or delete that text; and the search method to be used. También puede especificar la página de códigos que será utilizado. The actions are performed in the order in which they appear in the Actions list, and each action makes a complete pass through the trigger file before the next action is started.
You can transfer the list of actions between installed instances of BarTender by using the Import and Export options.
Existen las siguientes opciones.
Acciones: Lists the search and replace actions that you have configured. The following options are available in the toolbar at the bottom of the list:
Adds a new action to the list.
Borra la acción seleccionada de la lista.
Elimina la acción seleccionada de la lista, y la copia en el portapapeles.
Copia la acción seleccionada en el portapapeles.
Pega en la lista de acciones una copia de la acción que se encuentra en el portapapeles.
Sube la acción seleccionada una posición en la lista.
Baja la acción seleccionada una posición en la lista.
|
También puede acceder a estos comandos haciendo clic con el botón secundario del ratón en la lista de Acciones. |
Importar: Opens the Import Action List dialog so that you can load an actions list that was previously saved as an XML file in another installed instance of BarTender.
Exportar: Opens the Export Action List dialog so that you can save the current actions list in an XML file.
Action Options: Specifies the configuration for the action that is selected in the Actions list. Estas son las opciones disponibles:
Descripción: Specifies a descriptive name for the action.
Acción: Specifies what kind of transform action is to be performed.
Buscar: Especifica el texto que se buscará en el origen de datos seleccionado. To enter non-typable characters, such as carriage returns, into the search field, click , and then select the character that you want.
Sintaxis: Specifies the syntax that the search operation uses for the text in the Search Text field. Available options include literal, regular expression, and wildcard.
Solo primera ocurrencia: Especifica que la acción se realiza solo en la primera instancia del texto de búsqueda.
Reemplazar con: Especifica el texto que sustituye el texto de búsqueda en el origen de datos seleccionado. To enter non-typable characters into the search field, click , and then select the character that you want. Available when Action includes a "replace" or "delete" operation.
Insertar: Especifica el texto que se inserta antes o después de buscar texto en el origen de datos seleccionado. To enter non-typable characters into the search field, click , and then select the character that you want. Available when Action includes an "insert" operation.
Prueba: Abre el cuadro de diálogo Probar lista de acciones, que puede utilizar para probar la lista de acciones y confirmar que funcionan de la forma deseada. In this dialog, you can specify the location of a sample file that contains the data in the data source and export the file to a destination file. Las acciones se realizan en el orden que aparecen en la lista de Acciones.
You can use the search and replace transform to associate data-sourced colors with objects on your template. If the database that your document is connected to does not contain color information, you can use the search and replace transform to map each value in a database field to a unique color. The transform searches for the value of the field that you specify and replaces it with the color that you specify.
Observe el siguiente ejemplo:
Your company produces membership cards for a local gym. Members can have monthly, annual, or unlimited membership levels, and you want a color-coded stripe that corresponds to each level to appear on the cards. You have connected to a database that includes a "MemberLevel" field, and you want to associate this field with a different color for each membership level. In this case, you can use the search and replace transform to search for each membership level in the database and then map a different color to each level.
Para ello, siga estos pasos:
Connect your document to a database that contains a MemberLevel field that includes the following values: Monthly, Annual, and Unlimited.
Add a rectangular shape object to the template for the stripe.
Haga doble clic en el rectángulo para abrir el cuadro de diálogo Propiedades del recuadro.
Configure the rectangle's fill properties to use color that is sourced by using the search and replace transform. Para ello, siga estos pasos:
In the Fill Properties area, click the Color option to open the Color Picker.
Click to expand the Color Picker if it is not already expanded.
On the Standard or Custom tab, click Set via data source.
In the Data Sourced Color dialog, make sure that Get color from data source is selected, and then click Data Source in the left navigation pane.
On the Data Source tab, click for the Type field, and then use the Change Data Source Type wizard to change the data source type to Database Field. Haga clic en Siguiente.
On the Database Field page of the Change Data Source Type wizard, select the MemberLevel field in the Field name list, and then click Finish.
In the Data Sourced Color dialog, click the Transforms tab.
Click next to the Search and replace field to open the Search and Replace dialog.
On the toolbar at the bottom of the Actions list, click .
In the Actions Options area, configure the following properties:
In the Description field, add a descriptive name for the action.
In the Action list, make sure that Search and Replace is selected.
In the Search for field, enter the value of the MemberLevel database field that you want to search for. For example, enter "Monthly". Make sure that the term that you enter is an exact match for the term in the database that you want to search for.
In the Replace with field, enter the name or hexadecimal value of the color that you want to use for the Monthly membership level. (Supported colors are listed in the "Predefined Colors" section that follows.) If you use the hexadecimal value, do not include the number sign (#).
For Pantone colors, use either the "friendly" name (such as "Electric Purple") or the technical name (such as "PANTONE 18-3640 TN"). You can view a list of these colors by clicking the PANTONE tab of the Color Picker.
Repeat steps i and j for the other values in the MemberLevel database field.
Click OK to close the Search and Replace dialog.
Haga clic en Aceptar para cerrar el cuadro de diálogo Color con origen de datos.
As needed, repeat this procedure for the line properties of the rectangle. Otherwise, click Close to close the Box Properties dialog.
The following table lists supported predefined colors and their hexadecimal values. To view a list of supported Pantone colors, click the PANTONE tab in the Color Picker.
Nombre de color |
Valor HEX |
Nombre de color |
Valor HEX |
|||
---|---|---|---|---|---|---|
AliceBlue | #F0F8FF | LightSalmon | #FFA07A | |||
AntiqueWhite | #FAEBD7 | LightSeaGreen | #20B2AA | |||
Aqua | #00FFFF | LightSkyBlue | #87CEFA | |||
Aquamarine | #7FFFD4 | LightSlateGray | #778899 | |||
Azure | #F0FFFF | LightSteelBlue | #B0C4DE | |||
Beige | #F5F5DC | LightYellow | #FFFFE0 | |||
Bisque | #FFE4C4 | Lime | #00FF00 | |||
Black | #000000 | LimeGreen | #32CD32 | |||
BlanchedAlmond | #FFEBCD | Linen | #FAF0E6 | |||
Blue | #0000FF | Magenta | #FF00FF | |||
BlueViolet | #8A2BE2 | Maroon | #800000 | |||
Brown | #A52A2A | MediumAquamarine | #66CDAA | |||
BurlyWood | #DEB887 | MediumBlue | #0000CD | |||
CadetBlue | #5F9EA0 | MediumOrchid | #BA55D3 | |||
Chartreuse | #7FFF00 | MediumPurple | #9370DB | |||
Chocolate | #D2691E | MediumSeaGreen | #3CB371 | |||
Coral | #FF7F50 | MediumSlateBlue | #7B68EE | |||
CornflowerBlue | #6495ED | MediumSpringGreen | #00FA9A | |||
Cornsilk | #FFF8DC | MediumTurquoise | #48D1CC | |||
Crimson | #DC143C | MediumVioletRed | #C71585 | |||
Cyan | #00FFFF | MidnightBlue | #191970 | |||
DarkBlue | #00008B | MintCream | #F5FFFA | |||
DarkCyan | #008B8B | MistyRose | #FFE4E1 | |||
DarkGoldenrod | #B8860B | Moccasin | #FFE4B5 | |||
DarkGray | #A9A9A9 | NavajoWhite | #FFDEAD | |||
DarkGreen | #006400 | Navy | #000080 | |||
DarkKhaki | #BDB76B | OldLace | #FDF5E6 | |||
DarkMagenta | #8B008B | Olive | #808000 | |||
DarkOliveGreen | #556B2F | OliveDrab | #6B8E23 | |||
DarkOrange | #FF8C00 | Orange | #FFA500 | |||
DarkOrchid | #9932CC | OrangeRed | #FF4500 | |||
DarkRed | #8B0000 | Orchid | #DA70D6 | |||
DarkSalmon | #E9967A | PaleGoldenrod | #EEE8AA | |||
DarkSeaGreen | #8FBC8F | PaleGreen | #98FB98 | |||
DarkSlateBlue | #483D8B | PaleTurquoise | #AFEEEE | |||
DarkSlateGray | #2F4F4F | PaleVioletRed | #DB7093 | |||
DarkTurquoise | #00CED1 | PapayaWhip | #FFEFD5 | |||
DarkViolet | #9400D3 | PeachPuff | #FFDAB9 | |||
DeepPink | #FF1493 | Peru | #CD853F | |||
DeepSkyBlue | #00BFFF | Pink | #FFC0CB | |||
DimGray | #696969 | Plum | #DDA0DD | |||
DodgerBlue | #1E90FF | PowderBlue | #B0E0E6 | |||
FireBrick | #B22222 | Purple | #800080 | |||
FloralWhite | #FFFAF0 | Red | #FF0000 | |||
ForestGreen | #228B22 | RosyBrown | #BC8F8F | |||
Fuchsia | #FF00FF | RoyalBlue | #4169E1 | |||
Gainsboro | #DCDCDC | SaddleBrown | #8B4513 | |||
GhostWhite | #F8F8FF | Salmon | #FA8072 | |||
Gold | #FFD700 | SandyBrown | #F4A460 | |||
Goldenrod | #DAA520 | SeaGreen | #2E8B57 | |||
Gray | #808080 | Seashell | #FFF5EE | |||
Verde | #008000 | Sienna | #A0522D | |||
GreenYellow | #ADFF2F | Silver | #C0C0C0 | |||
Honeydew | #F0FFF0 | SkyBlue | #87CEEB | |||
HotPink | #FF69B4 | SlateBlue | #6A5ACD | |||
IndianRed | #CD5C5C | SlateGray | #708090 | |||
Indigo | #4B0082 | Snow | #FFFAFA | |||
Ivory | #FFFFF0 | SpringGreen | #00FF7F | |||
Khaki | #F0E68C | SteelBlue | #4682B4 | |||
Lavender | #E6E6FA | Tan | #D2B48C | |||
LavenderBlush | #FFF0F5 | Teal | #008080 | |||
LawnGreen | #7CFC00 | Thistle | #D8BFD8 | |||
LemonChiffon | #FFFACD | Tomato | #FF6347 | |||
LightBlue | #ADD8E6 | Turquoise | #40E0D0 | |||
LightCoral | #F08080 | Violet | #EE82EE | |||
LightCyan | #E0FFFF | Wheat | #F5DEB3 | |||
LightGoldenrodYellow | #FAFAD2 | White | #FFFFFF | |||
LightGray | #D3D3D3 | WhiteSmoke | #F5F5F5 | |||
LightGreen | #90EE90 | Yellow | #FFFF00 | |||
LightPink | #FFB6C1 | YellowGreen | #9ACD32 |
You can use the search and replace transform to add soft hyphens to your text. Soft hyphens are invisible formatting characters that you can use to dynamically break words at any defined hyphenation point.
Observe el siguiente ejemplo:
Your company produces labels that use one of several different languages to convey the same information. You define the hyphens for the text that is to be inserted in the text object so that the hyphenation will be correct for each language as it is printed, no matter the size or shape of the text object.
For example, for the German label, you want the following text to appear:
Ab dem 24. August 2023 muss vor der industriellen oder gewerblichen Verwendung eine angemessene Schulung erfolgen.
You use a backslash (\) and hyphen (-) combination to define hyphenation points for this text as follows:
Ab dem 24. Au\-gust 2023 muss vor der in\-dus\-tri\-ellen oder ge\-werb\-lich\-en Ver-wen\-dung ei\-ne an\-ge\-mes\-sene Schu\-lung er\-fol\-gen.
Then, you want to replace these hyphenation placeholders with a Unicode soft hyphen. When you do this, the printed label shows only those hyphens that are necessary for the size and shape of the printed text object and hides the others.
Para ello, siga estos pasos:
Add a normal wrapped text object to your BarTender template, and then enter the text that contains the backslash and hyphen combinations.
Haga doble clic en el objeto para abrir el cuadro de diálogo Propiedades del texto.
On the Transforms tab, click to the right of the Search and replace field.
On the actions toolbar, click to create a new action.
In the Action Options area, configure the settings as follows:
In the Description field, enter an optional description of the action.
In the Action list, select Search and Replace.
In the Search for box, enter a backslash and hyphen combination (\-).
In the Syntax list, select Literal.
Click inside the Replace with box, and then press ALT+0173. Notice that no character appears in the box, but the text in the text object adjusts to replace the backslash and hyphen combinations with soft hyphens.
Click OK to close the Search and Replace dialog.
Haga clic en Cerrar para cerrar el cuadro de diálogo Propiedades del texto.
On the BarTender template, you can resize the text object to observe how the hyphenation changes dynamically.
Temas relacionados