powered by CADENAS

Manual

Manual

5.8.2.1.15.3.  Batch process all tables in project

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. Depending on the selected option 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) in the Settings section the respective input fields in the sections Search criteria and Values to set are active.

Select the desired option and click on Next.

5.8.2.1.15.3.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. First, under Settings select the option Add variable / change variable value and click on Next.

    -> The respective dialog opens.

  2. Settings in the Search criteria section:

    • Under Search criteria -> Name of variable enter the variable name.

    • Leave the default under Data type at Text and number.

    • Leave the default under Variable types at All variable types.

  3. Settings in the Values to set section:

    • Variable description (optional):

    • Data type:

      • Do not change

      • Text

      • Number

      [Important] Important

      Make sure you indicate the correct Data type!

      In case for Value for variable an existing variable is referenced to (see example above "$NB."), you must orient yourself according to the data type.

    • Variable type:

      • Do not change

      • Table variables

      • Value range variables

      • Attribute algorithms

    • Identification type: (also see Section 7.8.13, “ Identification type ”)

      • Object attribute

      • Geometry attribute:

      • Additional attribute:

      • Function attribute:

      • Structure attribute:

      • Feature attribute:

      • Dimension attribute:

    • Save location: (also see Section 7.8.10, “ Save location: Only in geometry | Only in table | In geometry and table ”)

    • Unit:

      Value range:

      • Do not change (Default)

      • Remove

      • Change unit:

        • mm

        • cm

        • etc.

    • Decimal digits/string length (optional):

    • Variable position:

      With Variable position "2" for example, you set the new variable at the second position within the table.

    • Value for variable: You can insert a fixed value or a variable.

      [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.

    • Cutout from value:

      If you do not want to use the entire "$NB." expression as the variable value, but only a part string, then, under Cutout from value restrict it to, for example, the characters "1-5".

Result:

--> The new variable is added as 3. column into the table. The description is shown below the variable name. As variable value, the Standard name has been inserted.

Result: Variable LX with NB as value

Result: Variable LX with NB as value

5.8.2.1.15.3.2.  Change value of variable
[Note] Note

There is no difference in functionality whether a new variable with the desired value is added or whether the value of an existing variable is changed. That's why the setting options of the functions Add variable / change variable value and Change value of variable are identic.

Compare Section 5.8.2.1.15.3.1, “ Add variable / change variable value ”.

5.8.2.1.15.3.3.  Replace variable value

[Note] Note

The option Replace variable value enables the declaration of a concrete value (Value to replace) as search criteria.

Regular expressions can be used as well, if the checkbox Regular expression is activated. You can find detailed information on this under Section 15.3, “Regular expression ”.

Do the following:

Initial situation: Variable NEWVAR with value 2.000

Initial situation: Variable NEWVAR with value 2.000

  1. First, under Settings select the option Replace variable value and click on Next.

    -> The respective dialog opens.

  2. Under Name of variable define the respective variable (in this example NEWVAR). Also see Section 5.8.2.1.15.3.8, “Use of keywords ”.

  3. Under Value to replace enter the current variable value (here "2").

  4. Under Values to set , Value for variable assign the new variable value (here "99").

  5. Click on Start.

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

-> The changed column value(s) have been transferred.

Result: Variable NEWVAR with value 99.000

Result: Variable NEWVAR with value 99.000

5.8.2.1.15.3.4.  Delete variables

In order to delete an existing variable you have the following options:

  • Name of variable:

    • Enter the variable name and leave the default in the fields Data type and Variable types. You can also insert several variables comma separated.

    • Alternatively you can use the placeholder "*" for all variables. In this case then you can filter via the fields Data type and Variable types.

  • Data type:

    • Text and number

    • Text

    • Number

  • Variable types:

    • All variable types

    • Table variables

    • Value range variables

    • Attribute algorithms

Finally click on Start.

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

5.8.2.1.15.3.5.  Rename variable
  1. In the dialog box Edit tables in batch run, select the option Rename variable. If needed, also check Adapt links in assemblies.

    [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 won't work in the following two 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.

    -> The dialog box Edit tables in batch run is opened.

  2. First, under Settings select the option Rename variable and click on Next.

  3. Under Search criteria, Name of variable enter the name of the variable that you would like to rename.

    Normally you leave the default under Data type and Variable types (Text and number, All variable types).

  4. Under Values to set -> New variable name enter the new variable name.

  5. Under Values to set -> Variable description you can enter the new variable description optionally.

  6. Finally click on Start.

5.8.2.1.15.3.6.  Add variables from CSV / change variable values from CSV

You can overtake table values and/or add variables from a CSV file. In the following the procedure is explained with a small example:

  1. Initial situation:

    Currently the values of length of the variable "L" are 50.000, 60.000, 80.000 and shall be changed to 55.000, 65.000, 85.000.

    Furthermore the variable "P" with values shall be added.

    Initial situation

    Initial situation

  2. Make the desired values available via CSV file:

    [Note] Note

    Pay attention to state 4 header lines for Name of variable, Variable description, Unit and Data type ("T" for text, "Z" for numbers)!

    The basic structure of the CSV is according to the output after executing the context menu command under Output -> Create CSV table.

    Create CSV table

    Create CSV table

    IDNR;L;D;P
    Ident number;Length;Diameter;Threaded pitch
    ;mm;mm;mm
    T;Z;Z;Z
    1;55.000;10.000;1.500
    2;65.000;12.000;1.500
    3;85.000;16.000;1.500

  3. Select the option Add variables from CSV / change variable values from CSV and click on Next.

    Add variables from CSV / change variable values from CSV

    Add variables from CSV / change variable values from CSV

  4. CSV settings:

    CSV settings

    CSV settings

    • File selection:

      Via browse button ... , select one or several (Ctrl key) CSV files. If several are selected then these are displayed separated by the pipe icon.

    • Encoding: In the list field, select the desired codec.

      In this way you can ensure that umlauts for example are correctly handled. Using the default setting UTF-8 this should be the case normally.

    • Separator:

      Select the respective Separator and Sign of text identification in the list field.

    Click on Next.

  5. Column Settings:

    Check the settings and adjust them accordingly, if needed

    For all variables to be changed, activate the checkbox.

    Column Settings

    Column Settings

    • Identifying Column (in CSV file):

      All columns of the CSV file are displayed in the list field. Select the desired variable for the mapping between CSV file and catalog.

      In this example the mapping is made via the variable "IDNR". In practice this also may be the variable for the ID number. With an unique ID number, even when using several CSV files the assignment to the correct project can easily be made.

    • Variable name in the catalog:

      Insert the desired variable in the input field for the mapping between CSV file and catalog.

    • Columns to add/modify:

      • Checkbox: Activate those variables, where you want to change the values.

        With the checkbox in the column header you can select / deselect the variables altogether.

      • Description: Variable description, which is displayed in the table below the variable name.

      • Table variables:

        You may explicitly specify names of table variables.

        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 brackets behind the variable description.

      • Data type:

        Open the list field and select the desired option.

        • Text

        • Number

      • Status:

        Open the list field and select the desired option.

        • Table variable

        • Value range variable

        • Attribute algorithm

    • Add columns if non existent: If needed activate the checkbox.

    • Only create columns if there are table data available:

  6. Result:

    The values for the variable "L" have been changed accordingly to the values in the CSV file and the column "P" has been added with values.

    Result

    Result

5.8.2.1.15.3.7.  Input options in field "Name of variable"

The following table shows the input options in the Name of variable field:

Name

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

* (Asterisk)

  1. With the asterisk symbol, all variables are addressed

  2. Via the fields Data type and Variable types you can reduce the amount of indicated variables again.

! (Exclamation point)

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

@

@ sign plus keyword (e.g. @FIGUR) means: The keyword "FIGURE" is being addressed. Also see Section 5.8.2.1.15.3.8, “Use of keywords ”.

5.8.2.1.15.3.8. Use of keywords

Keywords serve the 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.).

You can also set - and this is important within the frame of the function Edit tables in batch run - variable names with keywords, which can then be assigned fixed values or values from other variables.

This will be explained using the example of the keyword in the Row Label field.

It is called ROWDESCRIPTION and controls the display of the respective column in the PARTdataManager table. Currently the column 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 option Replace variable value and click on Next.

  2. Under Search criteria at Name of variable enter @ROWDESCRIPTION.

  3. Under Search criteria at Value to replace enter $NENN..

  4. Under Values to set at Value for variable enter $NB..

  5. Finally click on Start.

--> In PARTdataManager, instead of NENN the new row description NB is located.