4.11.  Design "New ident number " dialog box - erpcustom.cfg -> Block [USERDIALOG]

Basic information:

  1. The settings apply equally to 3Dfindit and PARTdataManager.

  2. The Settings for the New Ident Number [new ident-no.] dialog box are displayed both when the from Dataset to Link Database [Add dataset to link database] ( 3Dfindit ) / ( PARTdataManager ) as well as Requesting an ERP Number by e-mail [Request ERP number per e-mail] ( 3Dfindit ) / ( PARTdataManager ) used.

    • Add data record to the link database [Add dataset to link database]: A field for the ERP number is automatically added to the basic dialog.

      Add data record to the link database [Add dataset to link database]: A field for the ERP number is automatically added to the basic dialog.

    • Request an ERP number by e-mail [Request ERP number per e-mail]: The corresponding fields from plinkcommon.cfg or plinkgroups.cfg are automatically assigned to the basic dialog.

      Request an ERP number by e-mail [Request ERP number per e-mail]: The corresponding fields from plinkcommon.cfg or plinkgroups.cfg are automatically assigned to the basic dialog.

  3. The dialog can be designed for all users in the same way or user-specific.

    • Common dialog:

      Just use the block [USERDIALOG].

    • User-specific dialog:

      Use the following syntax.

      Example:

      [USERDIALOG(Admin)]
      keys....
      [USERDIALOG(Designer)]
      keys...
      etc.

      May be a certain field is interesting for the administration, but not for the designer. So simply omit an entry for a certain role.

What is the structure of the dialog?

  • Some rows such as "Standard Title", "Standard Number" or "Dimension" for example ensure a correct identification of a part.

  • Additional lines can be optionally added when the dialog window is opened. In this way, values can be selected or entered freely and then exported to the LinkDB.

New ident number [new ident-no.] " dialog

New ident number [new ident-no.] " dialog

Syntax:

Concerning key naming, orient at general variable names such as NTLANG, NN, LINALANG, NB or LinkDB variable names.

For each key a list of values has to be specified.

In the following the field values (separated be the character defined under "SEPARATOR") are listed.

  • InternalVar=VarPLinkInternal:

    (in order to avoid any problems, normally use the key name again here)

  • StaticText: Description text of the input line

  • required:

    Value range: 0/1

    • 1 (default): entry required

    • 0: no entry required

  • Add2DB: Value is entered in LINKDB

    Value range: 0/1; default 1

  • default: Default value (empty by default)

    With square brackets "[ ]", VBS expressions can be stored here, which can perform more complex calculations in the background to calculate a default value.

    Examples:

    • Execute the function 'funktionsname' from the VBS/VBB module 'modulname' and transfer the 2 parameters param1 and param2. The module must be loaded beforehand (via the [LOAD] section or scripts/<appname>/autoexec. The parameters are separated with <#> instead of <,> to avoid problems with the SEPARATOR.

      [modulname.funktionsname(param1#param2)] 
      
    • Return of the current date in the format year, month, day

      [CreateObject("cnstools.datetime").Format("yyyyMMdd")] 
      
    • Return of the classified value of the order number

      • For 3Dfindit:

        [erpcustom.GetClassificationProperty(table#"cns"#"CNSERPBASE"#"CNSORDERNO")]

        Specifically:

        ABC=ABC,ABC:,1,1,[erpcustom.GetClassificationProperty(table#"cns"#"CNSERPBASE"#
         "CNSORDERNO")],1,1,,,.*,
      • For PARTdataManager:

        [erpcustom.GetClassificationProperty("cns"#"CNSERPBASE"#"CNSORDERNO")]

        Specifically:

        ABC=ABC,ABC:,1,1,[erpcustom.GetClassificationProperty("cns"#"CNSERPBASE"#
         "CNSORDERNO")],1,1,,,.*,

      Return of the classified value of the weight

      [erpcustom.GetClassificationProperty("cns"#"CNSPHYPROP"#"CNSMASSEXACT")]
      • For 3Dfindit:

        [erpcustom.GetClassificationProperty(table#"cns"#"CNSPHYPROP"#"CNSMASSEXACT")]
      • For PARTdataManager:

        [erpcustom.GetClassificationProperty("cns"#"CNSPHYPROP"#"CNSMASSEXACT")]

      In this context, the following variables can also be passed to the function:

      • table: The currently opened table (Application.ViewTable.Table)

      • document: The current document (Application.ActiveDocument)

      • prjPath: The path to the currently open project

    You can find an example of this at Section 4.11.1, “SAP / ERP investment dialog - GET function for classification values ”.

  • freeinput: Changeability of the corresponding line

    Value range: 0/1

    • 0: Row not changeable

      Makes sense for Standard Title, Standard Number, Dimension or automatically generated ERP number for example.

    • 1: Necessarily set for all rows with values which have to be changed.

  • ShowInDialog: Visibility in dialog box

    Value range: 0/1

    • 1 (default): The respective row is visible.

    • 0: The respective row is not visible (but a default value can be entered in the LINKDB, however it will not be shown in the dialog box)

  • selectionfile: Options contained in the file (e.g. material_assign.cfg) that are displayed in a list box.

    Also see material_assign.cfg.

    Exemplary content of the stated file:

    [*]
    0=
    1=8.8
    2=10.9
    3=12.9

    For a certain standard number, other default values may be defined as well.

    Exemplary content of the stated file:

    [norm/din_en_iso/stifte/scherstifte/din_1.prj]
    
    1=1.4301 (V2A)
    2=1.4571 (V4A)

    See also Section 4.12.1.2.3, “ Create ERP number directly on export ”.

    In addition to a CFG file, you can also use square brackets "[ ]" VBS expressions, which fill the list field with values.

    Examples:

    • PARTdataManager:

      [modulname.funktionsname(comboBox#erpdata)] 
      comboBox.Items.Add("Wert1") 
      comboBox.Items.Add("Wert2")
    • 3Dfindit:

      [modulname.funktionsname(values)]
      values.Add("Übersetzung1") 
      values.Add("Wert1") 
      values.Add("Übersetzung2") 
      values.Add("Wert2")

    In this context, the following variables can also be passed to the function:

    • comboBox: The object of the ComboBox to make direct adjustments to it

    • erpdata: The internal ErpData object for the data record creation (here you get the current table via erpdata.Table, for example)

    • userField: The configuration of the field

    • values (3Dfindit only): Array with the values, always as a pair of two of the displayed value and the actual value

  • combotype:

    Value range:

    • full: it is possible to select an option as well as enter a value

    • static (no own values may be entered)

    • button

    • empty (entry of own value possible)

  • regular expression

    Examples:

    • Only number allowed

      [0-9]*

    • Only letters allowed

      [A-Za-z]*

    • Tilde not allowed

      [^~]*

    You can use https://www.regexpal.com, for example, to test RegExp.

  • Message if Regexp fails

    Example:

    Only numbers allowed

    Standard text + specified message

    Standard text + specified message