Cross reference doesn't work

I have a very large project but I can’t find all the process variables when using cross reference, a tip how can I find the ones where the variables are being read and written?

Hi Estanislau,

No sure if you know this so I’ll just mention it here.

When using cross reference in AS, you need to make sure that there is a green tick after the cross reference valid lable.

Screenshot 2024-07-10 135416

Otherwise, you may not be able to get a reliable cross reference result.

To get the green tick, either compile your project or use “Build Cross Reference” under the Project tab.

image

Alternatively, you can use VS Code to open your project folder and do a search.

1 Like

Another idea: Automation Studio also has a Find in Files (CTRL+SHIFT+F). You also can use RegEx there to find places where the variable is assigned. VSCode as already mentioned also is a very nice alternative, since it’s faster and has a much better usability… :slight_smile:

1 Like

Find in Files is especially helpful with Text based programming languages (ST, C, etc…) as the results also show you the whole line of code, so you can directly see what is being done to the variable.

I don’t know regex, how does it work?

HI @Estanislau_2001

RegEx : Regular Expressions. It’s used as a sequence of characters to search a pattern.

I found this examples in VSCode: Use regular expressions and review examples - Visual Studio (Windows) | Microsoft Learn

Best regards!

2 Likes