#CDB_LEN

  • Some records can be shorter, that describe insided the CDBASE.chm (optional value).

  • To get the information about the record length the CADiNP variable #CDB_LEN can be used.

EXAMPLE: select nodal support forces, #CDB_LEN in case there are results, or ‘’=8’’ with no results

LET#CDB_LEN 0
LET#CDB_IER 0
@KEY N_DISP 1
LOOP
   LET#NR @NR
   LET#PY @PY
   IF #CDB_LEN>10
      TXA Knoten #(#NR,5.0) PY = #(#PY,7.3) kN
   ENDIF
ENDLOOP #CDB_LEN>1
  • Although the CADINP variable #CDB_IER will be set to =1, in case the length is shorter. There will be no information how much shorter the length really is.

EXAMPLE: select nodal support forces, #CDB_LEN in case there are results, or =8 with no results

LET#CDB_LEN 0
LET#CDB_IER 0
@KEY N_Disp 1
LOOP
   //CDB_IER=0 , because NR is within the read length
   LET#NR @NR
   IF #CDB_IER<2
      //CDB_IER=1 , because PY is outside the read length
      LET#PY @PY
      IF #CDB_IER<1
         TXA Node #(#NR,5.0) PY = #(#PY,7.3) kN
      ENDIF
   ENDIF
ENDLOOP #CDB_IER<2

Hint

We recommend to define both variable to avoid annoying CADINP error messages.