### Extract Root Path from File Path Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example demonstrates how to extract the root directory and path leading up to the file name, excluding the file name and extension itself. ```plaintext $(myPath:r) ``` -------------------------------- ### Extract Path Head from File Path Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example shows how to extract the directory path leading up to the file name, excluding the file name and extension. ```plaintext $(myPath:h) ``` -------------------------------- ### Zero-Based Indexing for Attributes Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example shows how to adjust an attribute value, typically an index, to be zero-based by subtracting one from its original value. This is common in programming when array indices start at 0. ```plaintext $(myIndex:0) ``` -------------------------------- ### Replace Spaces with Underscores in Path Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example demonstrates replacing all spaces within a file path attribute with underscores. This is often done to create valid filenames or variables for command-line tools. ```plaintext $(myPath:_) ``` -------------------------------- ### Extract File Extension from Path Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example demonstrates how to extract only the file extension from a given file path attribute. This is useful when you need to perform operations based on file type. ```plaintext $(myPath:e) ``` -------------------------------- ### Extract File Name from Path Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example shows how to extract only the file name (without the extension) from a file path attribute. This is useful for referencing the base name of a file. ```plaintext $(myPath:n) ``` -------------------------------- ### Modify Attribute Path to Uppercase Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example illustrates converting a file path attribute's value to all uppercase characters. This can be useful for case-sensitive systems or specific formatting needs. ```plaintext $(myPath:u) ``` -------------------------------- ### Modify Attribute Path with Forward Slashes Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example shows how to modify a file path attribute to use forward slashes instead of backslashes, which is often necessary for cross-platform compatibility or specific script requirements. ```plaintext $(myPath:/) ``` -------------------------------- ### Modify Attribute Path to Lowercase Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example shows how to convert a file path attribute's value to all lowercase characters. This is helpful for maintaining consistent formatting or adhering to specific naming conventions. ```plaintext $(myPath:l) ``` -------------------------------- ### Modify Attribute Path with Double Quotes Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This example demonstrates how to enclose a file path attribute's value in double quotes. This is useful when the path contains spaces or special characters that might otherwise cause parsing issues. ```plaintext $(myPath:q) ``` -------------------------------- ### Data Query Component Configuration for CSV Files Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/GettingStarted/Building-on-Key-Concepts-Writing-a-more-complex-workflow This configuration sets up the Data Query component to handle CSV files. It enables manual file selection and specifies that the result connector should be of type 'CSV Files'. ```text Data item type: File > Spreadsheet > CSV Files Open a file browser to allow manual selection Result connector type: CSV Files ``` -------------------------------- ### Reference Attribute by Name Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This code snippet demonstrates how to reference an attribute by its name within a configuration. It uses a simple placeholder syntax. ```plaintext $(attributeName) ``` -------------------------------- ### Python Expression Component Configuration Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/GettingStarted/Building-on-Key-Concepts-Writing-a-more-complex-workflow This snippet shows how to configure the input and output attributes for a Python Expression component. It defines 'Input_1' and 'Output_1' as Integer types, with 'Input_1' having a default value and 'Output_1' being derived from it. ```Python Output_1 = Input_1 + 2 ``` -------------------------------- ### Spreadsheet Data Component Configuration for Writing to CSV Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/GettingStarted/Building-on-Key-Concepts-Writing-a-more-complex-workflow This configuration demonstrates how to use the Spreadsheet Data component to write data to a CSV file. It specifies the input data source, the target cell, and enables the write operation. ```text spreadsheet file: $(Input_2) Write radio button enabled From attribute: $(Input_1) To cell reference: H2 ``` -------------------------------- ### Python Expression for Component Configuration in Workflows Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/GettingStarted/Building-on-Key-Concepts-Writing-a-more-complex-workflow-component-configuration This Python code snippet is used within a Maptek Workflow's Python Expression component to modify an integer input by adding 5. It assumes an input attribute named 'Input_1' and an output attribute named 'Output_1'. The 'iterator' variable is used to process each item in the input list. ```python Output_1 = int(iterator) + 5 ``` -------------------------------- ### Reference Attribute by Type Source: https://help.maptek.com/workflows/2021.5/Workflow%20Editor/Appendices/Appendices-C-Attributes This code snippet shows how to reference an attribute by its type. It utilizes a specific notation to denote type-based referencing. ```plaintext $(attributeType!) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.