---
title: GetToolInfo
slug: gettoolinfo
docTags: 
createdAt: 2023-04-19T13:13:46.000Z
---

Retrieves information about used tools inside the current job and stores that information in a [variable](docId\:oqHjs3LLCfQkSac_cemc2).

:::BlockQuote
GetToolInfo \<num | first | next> \<variable number>
:::

### Example

`GetToolInfo num 200` will store the number of used tools in the current job in variable `#200`
`GetToolInfo first 201` will store the first tool number in variable`#201`
`GetToolInfo next 201 `will store the next tool number in variable`#201`


:::BlockQuote
; Enumerate tools used in a job.
; As an example, this can be used to measure the length of all tools at once before running the job.

sub measure\_used\_tools
&#x20;   GetToolInfo num 5025 ;&#x20;
&#x20;   Msg "number of tools used = " #5025
&#x20;  &#x20;
&#x20;   GetToolInfo first 5025
&#x20;   while \[#5025 \<> -1]
&#x20;       gosub m\_tool\_no\_dlg ; Subroutine that measures tools       &#x20;
&#x20;       msg "Tool "#5025" is measured"
&#x20;       GetToolInfo next 5025
&#x20;   endwhile
endsub

:::

