7.8.12.9. Various thread pitches and derived automatic calculations for e.g. line description and core diameter

With the help of the expressions GETTHREADTEXT or GETTHREADVALUE different output can be created by little adjustments. GETTHREADTEXT returns text, GETTHREADVALUE a number (double). The functionality is equivalent.

General form:

Parameter 1Parameter 2Parameter 3Parameter 4Parameter 5
Nominal thread diameter: In the case of DIN 158, this is the variable 'ND'. Standard designation [Standard name]: Specification of the desired thread table (e.g. DIN 158)

Variant: Optional for determining the correct line if there are variants (e.g. for DIN 158). Usually there are none; then the value remains empty in quotation marks.

Thread pitch: In the case of DIN 158, this is the variable 'PITCH'.

The return value is the filtered value of the variable specified here.

With the help of the first four parameters a row is specified, the fifth parameter specifies the variable whose value shall be returned.

Example:

VARIABLE  =  GETTHREADTEXT(D,'DIN 13','',P,'NAME')

[Note]Note

In the case of GETTHREADTEXT the data type of VARIABLE has to be text.

In the case of GETTHREADVALUE the data type of VARIABLE has to be a number.

Rückgabewert

NAME  =  GETTHREADTEXT(D,'DIN 13','',P,'NAME') // ergibt z.B. M10x1
TYPE  =  GETTHREADTEXT(D,'DIN 13','',P,'TYPE') // ergibt z.B. M
KDI   =  GETTHREADTEXT(D,'DIN 13','',P,'KDI')  // Kerndurchmesser Innengewinde
KDA   =  GETTHREADTEXT(D,'DIN 13','',P,'KDA')  // Kerndurchmesser Aussengewinde
SIZE  =  GETTHREADTEXT(D,'DIN 13','',P,'SIZE') // ergibt z.B. 10x1

[Note]Note

Any table variable can be used for the last parameter. The above mentioned (NAME, TYPE, KDI, KDA, SIZE) are always available normally.

Example: Thread table of DIN 158

Example: Thread table of DIN 158

Example 1:

  1. Specify a variable for the row description (in this example "GEW").

  2. Create a characteristic algorithm [Attribute algorithm] for this variable.

    GEW=GETTHREADTEXT(D,'DIN 13','',P,'NAME')

    Thread - attribute algorithm

    Thread - attribute algorithm

  3. Enter the variable 'GEW ' under PARTproject -> General -> Line description [Row label].

Result:

-> The content of the field "NAME" of table "DIN 13" is returned to variable GEW as text.

Example 2:

Calculate core diameter [Core diameter] external thread [Outer thread] automatically and display in PARTdataManager

KDA = GETTHREADTEXT(D,'DIN 13','',P,'KDA')

  1. Create an attribute algorithm as above.

  2. Set the variable KDA in PARTproject -> Edit project -> General -> Variables -> Sequence/groups of variables [Order/Groups of Variables] visible.

    -> The core diameter is now displayed in the PARTdataManager is now displayed.

    Line description [Row label] / core diameter [Core diameter]

    Line description [Row label] / core diameter [Core diameter]

Example 3:

GET=GETTHREADTEXT(ND,'DIN 158',VARIANT,PITCH,'NENN')

Compare Fig. „Example: Thread table of DIN 158“.

Example 4:

X=GETTHREADVALUE(ND,'DIN 158','Kurz',PITCH,'L1')

-> The value for ND is taken and set as filter for the nominal diameter in table "DIN 158".

-> The value of PITCH is taken and set as filter for the pitch in table "DIN 158".

-> The filter "variant = 'Kurz' is set in table "DIN 158".

-> The content of field L1 of table "DIN 158" is returned as a number.