5.8.2.1.16.1.  Edit project in batch mode

The attribute tables, assigned to the individual parts/projects of a catalog, can be modified via a batch run.

There are different ways to edit the table variables. Select the desired mode in the list field on the top:

  • Add variable / change variable value

  • Change value of variable

  • Replace variable value

  • Delete variables

  • Rename variable

  • Add variables from CSV / change variable values from CSV

  • Add plane/sketch

Depending on the option selected, the corresponding input fields in the Search criteria and Values to be set [Values to set] sections are active.

Edit in batch

Edit in batch

Make the appropriate settings and click on Start.

Details on the single options can be found in the following.

5.8.2.1.16.1.1.  Add variable / change variable value

This function both enables adding a new variable and at the same time setting the variable value, but also in addition setting of characteristics such as column position inside the table for example.

  1. Select the option Add variable / Change variable value [Add variable / change variable value].

    Edit in batch run [Edit in batch] dialog box

    Edit in batch run [Edit in batch] dialog box

  2. Settings in the Search criteria section:

    • Enter the variable name under Variable name [Name of variable]Table/geometry variable [Table/geometry variables].

    • Leave the default setting under Data type as Text and Number [Text and number].

    • Leave the default setting under Variable types as All variable types.

  3. Settings in the section Values to be set [Values to set]:

    • Variable description (optional)

      Example of a variable description [Variable description]

      Example of a variable description [Variable description]

    • Data type:

      • Do not change

      • Text

      • Number

      [Important]Important

      Be sure to enter the correct data type [Data type]!

      If an existing variable (see example above "$NB.") is referenced as the value for the variable [Value for variable], you must use the data type of this variable as a guide.

    • Variable type:

      • Do not change

      • Table variables

      • Value range variables

      • Attribute algorithms

    • Type identification [Identification type]: (see also Section 7.8.14, “ Identification type)

      • Object attribute

      • Geometric feature [Geometry attribute]:

      • Supplementary feature [Additional attribute]:

      • Functional feature [Function attribute]:

      • Outline feature [Structure attribute]:

      • Attribute feature [Feature attribute]:

      • Dimensional characteristic [Dimension attribute]:

    • Storage location [Save location]: (see also Section 7.8.11, “ Storage location: Only in geometry | Only in table | In geometry and table)

      • Only in geometry

      • Only in table

      • In geometry and table

    • Unit:

      Value range:

      • Do not change (default)

      • Remove

      • Change unit:

        • mm

        • cm

        • etc.

    • Decimal places:

      • Do not change [Don't change]

      • 0 (integer [Integer] )

      • Decimal number (0.1)

      • Decimal number (0.12)

      • Decimal number (0.123)

      • Decimal number (0.1234)

      • Decimal number (0.12345)

    • Variable position:

      With the variable position [Variable position] "2", for example, you set the new variable to the 2nd position within the table.

    • Value for variable: Both a fixed value and a variable can be used as the value.

      [Note]Note

      Restriction:

      Numerical calculations like "L +1" e.g. don't work here. Only text with placeholders is allowed and these are always considered as text.

    • Excerpt from Wert [Cutout from value]:

      If you do not want to use the entire expression "$NB." as a variable value, but only a substring, limit the section from value [Cutout from value] to the characters "1-5", for example.

Result:

→ The new variable is integrated into the table as the 3rd column. The description is displayed below the variable name. The standard designation was entered as the variable value.

Result: Variable LX with NB as value

Result: Variable LX with NB as value

5.8.2.1.16.1.2.  Change value of variable
[Note]Note

Functionally, there is no difference between adding a new variable with a desired value and changing the value of an existing variable. The setting options for the Add variable / Change variable value [Add variable / change variable value] and Change variable value [Change value of variable] functions are therefore identical.

Compare Section 5.8.2.1.16.1.1, “ Add variable / change variable value.

5.8.2.1.16.1.3.  Replace variable value

The Replace variable value option allows you to specify a specific value (Value to replace [Value to replace] ) as a search criterion.

Example:

Initial situation: Variable NEWVAR with value 2.000

Initial situation: Variable NEWVAR with value 2.000

  1. Select the Replace variable value option.

  2. Under Variable name [Name of variable], specify the desired option in the first list field and the relevant variable in the second list field (here NEWVAR as an example).

  3. Under Value to replace, enter the current variable value (here "2"). (Regular expressions can also be used if the Regular expression checkbox is activated)

  4. Under Values [Values to set] to be set, enter -> Value for variable enter the new variable value (here "99").

  5. Click on Start.

Open the table file(s) of the corresponding projects.

→ The changed column value(s) has/have been adopted.

Result: Variable NEWVAR with value 99.000

Result: Variable NEWVAR with value 99.000

5.8.2.1.16.1.4.  Delete variables
  1. In the Edit in batch run [Edit in batch] dialog box, select the Delete variables option.

  2. Variable name [Name of variable]:

    • In the first list field, select the desired option from Table/geometry variable [Table/geometry variables], Project variable or Other.

      In the second list field, select the desired variable. Also multiple variables can be entered by free input and separated by comma.

      Leave the default settings in the Data type and Variable types fields.

    • Alternatively, you can also set the placeholder "*" for all variables. In this case, you then filter using the Data type and Variable types fields.

      • Data type:

        • Text and number

        • Text

        • Number

      • Variable types:

        • All variable types

        • Table variables

        • Value range variables

        • Attribute algorithms

  3. Finally, click on Start.

    → The variable(s) is/are removed from the table.

5.8.2.1.16.1.5.  Rename variable
  1. In the Edit in batch run [Edit in batch] dialog box, select the Rename variable option. If necessary, also activate the Adapt references in assemblies [Adapt links in assemblies] checkbox.

    [Note]Note

    The renaming of variable names does not only influence the table, but also all files (*.prj, *.cfg, *.3db and the translation file), in which the variable comes up.

    [Important]Important

    All files containing variables to be renamed have to be in or under the calling directory.

    Especially for assemblies you have to take care about this fact, because part and assembly files can be in very different directory levels and far apart from each other.

    Renaming will not work in the following 2 cases:

    • Selection does not contain both (project with table and assembly files)

    • If a variable cannot be renamed in the project it cannot be renamed in the assembly file either.

    Example: "ssd2_switch_w_s.prj" is used in "sca2-b_asmcfg.prj". Only the directory "cylinder" is superordinated to both project files.

    Example: "ssd2_switch_w_s.prj" is used in "sca2-b_asmcfg.prj". Only the directory "cylinder" is superordinated to both project files.

  2. Enter the variable name to be changed under Search criteria -> Variable name [Name of variable].

    As a rule, leave the default setting under Data type and variable types [Variable types] (Text and number [Text and number], All variable types ).

  3. Enter the new variable name under Values to be set [Values to set] -> New variable name.

  4. Optionally, enter the new variable description under Values to be set [Values to set] -> Variable description.

  5. Finally, click on Start.

5.8.2.1.16.1.6.  Add variable from CSV / take values ​​from CSV

You can transfer table values and/or add variables from a CSV file. In the following the procedure is explained with the help of an example:

  1. Initial situation:

    For one line the variable values are complete. The other lines shall be filled from a CSV file.

    It is also possible to add further missing details such as unit [Unit] or correct incorrect details such as storage location [Save location].

    Initial situation

    Initial situation

  2. Make the desired values available via CSV file:

    [Note]Note

    Please note that the required structure of the CSV file depends on the option selected under CSV format [CSV-Format].

    • Required structure of the CSV file when selecting CADENAS [Cadenas standard] standard:

      In the Data type line, use "T" for text and Z for number.

      IDNR;NENN;DG;GK;DA;DK;DW;X;H;M;S;T
      Identifikationsnummer;Zeilenbeschreibung;Gewindenenndurchmesser;...;.....;...
      ;;mm;mm;mm;mm;mm;mm;mm;mm;mm;mm
      T;T;Z;Z;Z;Z;Z;Z;Z;Z;Z;Z
      1;M4;4;3.242;4.6;6.5;5.8;1.4;8;3.2;7;5.26
      2;M5;5;4.134;5.75;7.5;6.8;1.6;10;4;8;7.21
      3;M6;6;4.917;6.75;9.5;8.3;2;12;5;10;7.71
      4;M8;8;6.647;8.75;12.5;11.3;2.5;15;6.5;13;10.65
      5;M10;10;8.376;10.8;15;14.3;3;18;8;16;12.65

      You can obtain such a structure of the CSV file e.g. via the context menu command in the PARTproject catalog indexOutputCreate CSV table.

      Create CSV table

      Create CSV table

    • Required structure of the CSV file if Cadenas extended number format [Cadenas enhanced numbers] is selected:

      In the Data type line, use "A10" for text, "I1" for integer and "F5.1" to F5.5" for decimal numbers.

      "IDNR";"NENN";"DG";"GK";"DA";"DK";"DW";"X";"H";"M";"S";"T"
      "Identifikationsnummer";"Zeilenbeschreibung";"Gewindenenndurchmesser";"...";.....;"..."
      "";"";"";"";"";"";"";"";"";"";"";""
      "A10";"A10";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3"
      "1";"M4";"4";"3.242";"4.6";"6.5";"5.8";"1.4";"8";"3.2";"7";"5.26"
      "2";"M5";"5";"4.134";"5.75";"7.5";"6.8";"1.6";"10";"4";"8";"7.21"
      "3";"M6";"6";"4.917";"6.75";"9.5";"8.3";"2";"12";"5";"10";"7.71"
      "4";"M8";"8";"6.647";"8.75";"12.5";"11.3";"2.5";"15";"6.5";"13";"10.65"
      "5";"M10";"10";"8.376";"10.8";"15";"14.3";"3";"18";"8";"16";"12.65"

      You can obtain such a structure of the CSV file, for example, in PARTdesignerTableSave as CSV file.

      Location of the button in the software

      Location of the button in the software

  3. Select the option Add variable from CSV/accept values from CSV [Add variable from CSV / take values ​​from CSV].

    Edit [Edit in batch] window in batch run [Edit in batch]

    Edit [Edit in batch] window in batch run [Edit in batch]

  4. File selection " dialog area:

    • Enter a CSV manually or use the Browsebutton . .. button to select one or more (Ctrl key) CSV files. If several are selected, they are separated with the pipe symbol.

    • Coding [Encoding]:

      It's about text encoding, normally UTF-8. In this way it is ensured that i.g. umlauts will be correctly processed. The default setting UTF-8 will ensure this in the most cases.

      If another encoding is needed, you can set it here (e.g. if very old CSV files, encoded with ANSI, containing any special characters, shall be read).

    • CSV format [CSV-Format]:

      • Cadenas standard

        • 1. row: Variable name

        • 2. row: Variable description

        • 3. row: Unit

        • 4. row: Data type

          In the CSV file, only "T" for text and "Z" for number can be stated.

          Variable1;Variable2;Variable3;...
          Variable description 1;Variable description 2;Variable description 3;...
          ;;Einheit;Einheit;...
          T;T;Z;Z;Z;Z;Z;Z;Z;Z;Z;Z
          Daten
          Daten
          ...

          For each number, "Decimal number (0.123)" is automatically inserted, as this is the default for decimal numbers. When opening the list field, you can make the following modifications:

          • Text

          • Integer

          • Decimal number (0.1)

          • Decimal number (0.12)

          • Decimal number (0.123)

          • Decimal number (0.1234)

          • Decimal number (0.12345)

          Edit [Edit in batch] window in batch run [Edit in batch]

          Edit [Edit in batch] window in batch run [Edit in batch]

        • All other rows contain data.

        Is used e.g. for an export if you execute the context menu command OutputCreate CSV table on a project in PARTproject.

      • Cadenas enhanced numbers

        • 1. row: Variable name

        • 2. row: Variable description

        • 3. row: Unit

        • 4. row: Data type, but with PSOL VIDA depiction here

          • For text, "A10" is entered

          • For integers, "I1" is entered

          • For decimal places, "F5.1", "F5.2", "F5.3", "F5.4" or "F5.5" is entered (second number specifies the amount of decimal places)

          Variable1;Variable2;Variable3;...
          Variable description 1;Variable description 2;Variable description 3;...
          ;;Einheit;Einheit;...
          "A10";"A10";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3";"F5.3"
          Daten
          Daten
          ...

        • All other rows contain data.

          The data structure is therefore the same as the CADENAS standard [Cadenas standard] except for the data type.

        Is used, for example, in the PARTdesigner when you click on Save as CSV file in the table.

      • No specific format

        • 1. row: Variable name

        • All other rows contain data.

        This format does not provide a way to determine description, unit or data type. It is always text and so should only be used if other information is missing.

      • Try to detect

        An attempt is made here to recognize one of the two CADENAS formats. If this is not successful, the No specific format option is used.

    • Separator:

      Specifies by which character columns are separated in the CSV file. Background: In Germany, for decimal numbers a comma is used for the separation of decimal places; so it can not be used as separator for columns. As different exporters create CSV files with different separators, this can be adjusted here accordingly to ensure correct reading.

      Text identifier [Sign of text identification] is similar.

    Click on Continue [Next].

    Now the CSV is read and you will be forwarded to the next dialog page, where the information loaded from the CSV can be adjusted and enhanced.

  5. Column-dependent settings [Column Settings] " dialog area:

    Check the settings.

    Column Settings

    Column Settings

    If needed, adjust them accordingly.

    Adjustments to the column entries

    Adjustments to the column entries

    Activate the checkbox for all variables for which you want to make changes.

    • Identifying column [Identifying Column] / variable name in the catalog [Variable name in the catalog]:

      Specify the variable that you want to use to create the assignment between the CSV file and the catalog. All columns (variables) of the CSV file are displayed in the list field of Identifying column [Identifying Column].

      (In above exemplary figure, the mapping is made with the help of the variable "IDNR". In practice, mostly this is the variable of the ID number. With an unique ID number, even when using several CSV files the assignment to the correct project can easily be made.)

      In the input field of Variable name in the catalog, enter the variable that you want to use to create the assignment between the CSV file and the catalog.

      The data can be assigned to the correct row based on the assignment between the identifying column [Identifying Column] and the variable name in the catalog [Variable name in the catalog].

      Small example: The CSV has the columns "IDCSV" and "B"; the table has the columns "IDTAB" and "A". Now the variable "B" shall be added to the table from the CSV. However, the CSV has more lines.

      Values from CSV and table: 1

      Values from CSV and table: 1

      If you now select IDCSV as " Identifying column [Identifying Column] " and IDTAB as " Variable name in catalog [Variable name in the catalog] ", the correct 3 values of B can be added to the table, namely exactly where IDCSV and IDTAB have the same value.

      Values from CSV and table: 2

      Values from CSV and table: 2

      The result of the filled table looks like this.

      Values from CSV and table: Result

      Values from CSV and table: Result

    • Columns to be changed/added [Columns to add/modify]:

      In the following the meaning of the single table columns is explained:

      • Checkbox: Activate the checkbox for the variables where you want to change the variable values.

        You can activate or deactivate all variables using the checkboxes in the column header (x).

      • Name: Variable name

      • Description: Variable description that is displayed in the table under the variable name.

      • Table variable [Table variables]: Enter a name here if the variable is to be copied from the CSV into the table, but should have a different name there. If the field is empty, the name from the CSV ("Name" column) is copied.

        The specification is taken into account when checking the names. If the variable name in the CSV is invalid for the table (not allowed character e.g.) you can either adjust the name or explicitly set another name and leave the invalid original name.

      • Unit: The unit is displayed in the column header, in square brackets after the variable description. The value can be customized, but may also be empty.

      • Data type:

        If the option Cadenas standard was selected in the first dialog under CSV format [CSV-Format], which only allows text or number, "Decimal number (0.123)" is automatically entered here for each number (which is the default for decimal numbers in PSOL).

        If the Cadenas extended number format [Cadenas enhanced numbers] option was selected in the first dialog under CSV format [CSV-Format], the display corresponds exactly to the differentiated specification from the CSV.

        When opening the list field, in both cases, you can adjust the format - if needed.

        • Text

        • Integer

        • Decimal number (0.1)

        • Decimal number (0.12)

        • Decimal number (0.123)

        • Decimal number (0.1234)

        • Decimal number (0.12345)

      • Status: Select the desired option from the list box.

        • Variable with fixed values (default): Each table row has its own value for this variable.

        • Value range variable: Syntax equivalent to PARTdesigner Variable manager [Variable Manager].

        • Characteristic algorithm [Attribute algorithm]: Syntax equivalent to PARTdesigner Variable manager [Variable Manager]

        [Important]Important

        Value range variables and attribute algorithms do not have their own value for each row, but in each the same algorithm (or value range) is stated. The result however, can be different in each row.

        Here in the CSV, each line contains the same algorithm/value range

      • Type identification [Identification type]: Equivalent to PARTdesigner Variable manager [Variable Manager]

        • Geometry attribute

        • Object attribute

        • Function attribute

        • Dimension attribute

        • Feature attribute

        • Structure attribute

        • Additional attribute

      • Translate [Translation]: Use the checkbox to specify whether the respective variable in the project should be added to the variables to be translated or not.

      • Hide: Use the checkbox to specify whether the respective variable should be hidden in the project or not.

      • Group assignment [Variable group]: Optionally determine the group assignment of a variable in the project here.

        Basically a variable can be included in several groups. For this, enter a comma separated list.

        With a prefixed "!", the respective variable can be removed from groups.

        Example:

        GRUPPE1,!GRUPPE2,GRUPPE4

        With this value, the variable is added in the groups "GROUP1" and "GROUP4" and removed from "GROUP2".

        [Note]Note

        Groups have to exist in the catalog!

        Since the user cannot necessarily also edit the catalog root node when editing via batch (because he may not have SVN rights for this), at the end of the batch run it may be displayed which groups have been added and still need to be added to the catalog manually.

      • Storage location [Save location]: Equivalent to PARTdesigner Variable manager [Variable Manager]

        • Only in table

        • In geometry and table

        • Only in geometry

      • Default value: This column specifies a default value in the event that no suitable line is found in the CSV via the identifier.

        If in the example above there was another row in the table with IDTAB value 1022, this would not be found in the CSV (because IDCSV does not have such a value) and therefore the value could not be transferred.

        Then in such a case the default value is entered. If no default value is given, an internal default value is taken as fallback ("ugly" small number).

    • Add columns if they do not yet exist [Add columns if non existent]: If this option is activated, variable columns are created in the table if they do not yet exist there.

      In above example this checkbox should be enabled, because "B" did not exist in the table before.

      If this checkbox is not enabled, only those variable values will be adjusted where the variable does already exist before.

    • Only create columns if data is available for the table [Only create columns if there are table data available]: This option prevents a variable from being created in a table if not a single identifier row matches.

      So, if in above example not a single value of IDTAB can be found in the CSV under IDCSV, then the variable is not created.

  6. " Condition " dialog area: (equivalent to condition in the other batch run modes)

    Here, you can set basic conditions for the batch run. For example, that only visible projects are edited, or only invisible.

    Consider hierarchy checkbox: The folder structure is taken into account. E.G: I only want to edit visible projects. It may be that a project itself is visible, but a directory above it is hidden.

    Example

    Example

    brb250_boden.prj itself is visible, but the directory einzelteile is hidden.

    If the Only visible projects option is selected and the Include hierarch [Consider hierarchy] y checkbox is NOT activated, the project is edited because it is visible. However, if the Include hierarch [Consider hierarchy] y checkbox is activated, the project will not be edited because a directory above it is hidden. The system then also checks whether any directory above it (up to the catalog root node) is hidden.

    Back button takes you back to the first dialog where you can select the CSV file.

    Start button starts the batch run.

    Cancel button closes the Edit in batch dialog without doing anything.

  7. Click on Start.

    → The Fill table column dialog shows the progress.

    Fill table column window

    Fill table column window

  8. Result:

    → The missing values were read in accordingly.

    Result

    Result

5.8.2.1.16.1.7.  Possible entries in the "Variable name " field

The following table shows possible entries in the Variable name [Name of variable] field.

Name

for example: NB, L, etc. (comma-separated listing is possible as well)

* (star)

  1. All variables are addressed with the star symbol

  2. The number of variables addressed can be restricted again using the Data type and Variable types fields.

! (exclamation mark)

Exclamation mark plus variable (e.g. !NB ) means: all variables are addressed except the one behind the exclamation mark.

5.8.2.1.16.1.8. Use of keywords

Keywords are used for internal data communication between PARTproject and PARTdataManager.

You can see existing keywords by opening the respective project file (in the "23d-libs" directory) with the text editor.

The keywords are listed to the left of the equal symbol (here: TYPE, PROJECT, SHORTNAME, etc.).

Keywords can also be used - and this is important here in the context of the Edit in batch run [Edit in batch] function - to insert variable names, which in turn can be assigned fixed values or values of other variables.

This will be explained using the example of the keyword of the line description [Row label] field.

It is ROWDESCRIPTION and controls the display of the corresponding column in the table of PARTdataManager. The column currently contains values according to "$NENN." (see project file).

[Note]Note

Row description (keyword "ROWDESCRIPTION")

In the example at the right, the column with M12x45, M12x50, etc.

In order to apply new values to this column, do the following:

  1. Select the Replace variable value option.

  2. Under Search criteria -> Variable name [Name of variable], select the Project variable option in the first list box and the ROWDESCRIPTION option in the second list box.

  3. Under Search criteria, enter$NENN. under Value to replace.

  4. Under Values to be set [Values to set], enter the value for variable [Value for variable] $NB..

  5. Finally, click Start.

-> In the PARTdataManager now contains the new line description NB instead of NENN.

5.8.2.1.16.1.9.  Add plane/sketch

Especially in projects with many 3dbs or with connection points used again and again, certain sketches are multiply used. Copying would be very time consuming. Much more simple and quicker it copying sketches via batch run.

With the function Edit in batch run [Edit in batch], option Insert layer/sketch [Add plane/sketch], a selected layer or a selected sketch is added in all projects and there in all 3dbs.

The new sketch is added to the 3D history [3D History] with a consecutive number.

Insert example sketch

  1. Save the sketch to be copied (*.hsk file) at any place.

  2. Open the context menu command Automation -> Edit project in batch run [Edit project in batch mode] via the same project (to copy to all 3dbs there), another project or a directory.

    -> The Edit in batch run [Edit in batch] dialog box opens.

  3. Select the Insert layer/sketch [Add plane/sketch] option in the top list field.

    Insert sketch

    Insert sketch

  4. Activate the Sketch checkbox.

  5. Select sketch: Click on the Open file button and enter the path to the sketch file.

    Reference plane: Enter the name of the reference plane on which the sketch is to be inserted.

    If reference layer does not exist [If reference plane does not exist]: Select either the Do not insert sketch [Do not add sketch] option or a specific layer.

  6. Click Start.

    -> At all desired projects, the sketch is inserted in every 3db.

    [Important]Important

    Connection point duplicates are listed in a message box.

    CP Name (xy) is not unique

    CP Name (xy) is not unique

    Duplicates are allowed if only one connection point is active. Make sure that this is the case!