GetCLD function

Use the <GetCLD> operator to browse CLData commands in the order they appear in the file. Browsing is possible only in forward direction. Syntax:


{CldCode =} GetCLD(i: Integer; a: Array of Real)



  • <CldCode> – <GetCLD> optionally returns the code of retrieved CLData command.
  • <i> – relative index of the queried CLData command:
  • 0 – current command,
  • 1 – next command,
  • 2 – second command from the current and so on.
  • <a> – a dynamic array of real, that will receive the data of the retrieved CLData command. It must be defined before the operator call.


For example, suppose the CLDATA commands list is as the following, приведенный ниже and suppose the current command is number 9:


 5: CUTCOM    ON(71),LENGTH(9) 2,X 0,Y 0,Z 0,N 0,K 0,M 0,LEFT(8)

 6: RAPID     N 10000

 7: GOTO.abs  X 134.533,Y 99.684,Z 80

 8: RAPID     N 10000

 9: GOTO.abs  X 134.533,Y 99.684,Z 74.400

10: FEDRAT    N 50,K 4,MMPM(315)

11: GOTO.abs  X 134.533,Y 99.684,Z 73.400

12: FEDRAT    N 200,K 0,MMPM(315)

13: PLANE     XY(33)


The technology command <GOTO.abs> program is the following:


program AbsMov

  a: Array of Real  ! The array must be defined beforehand

  с: Integer        ! This variable will receive the operation code

  c = GetCld(1, a)  ! Retrieving the next command data

  if c = CodeOfCmd(“FEDRAT”) then

    ! Output the value of the first item of CLD array of

    Print “FEDRAT.CLD[1]=”, Str(a[1]) ! the next command



The result of the program execution will be:




To get access to the parameters of arbitrary technological command can also use the CLDFile operator.




Сопутствующие ссылки:

Функции и операторы работы с CLData