Twincat 3 - Refactoring

matejak14

Member
Join Date
Jan 2020
Location
Belgrade
Posts
6
Hello everyone,

I have a problem with TwinCAT 3. When I want to rename a variable, the name is changed only at this position, but not in other places where that variable is used in the software. I have already checked in the TwinCAT options (Tools > Options) under category TwinCAT > PLC Environment > Refactoring but everything is already turned on. Also in the Beckhoff documentation is written that when I select variable under refactoring there is rename option, but in my case, there is no rename (See in the picture).
refactoring.jpg


Thank you in advance,

Best regards, Mateja
 
Thank you very much for a quick answer. There is a global search but I am looking for a better solution because I need to change names for a lot of variables and also with refactoring error possibility is less.
 
Have you built your project since those variables were created? It's possible that TwinCAT requires a Build before the refactoring can work.
 
Its hard for me to tell from the screen snip you included but it looks to me like you are trying to rename an element in a structure. From all the examples I have seen the refactoring command takes effect at the tag level. I'm not sure refactoring applies to sub-elements of a tag. You may be stuck with search and replace.

Keith
 
Thank you a lot for your help. Unfortunately still not working. I tried to build the project and rename a global variable but without success.
z9ypdnR.png
 
Last edited:
Hello mateja,


I checked in my version of TwinCAT (3.1.4022.22) and I have the option you are mentioning (Rename variable). What shell are you using to run TwinCAT (VS 2013 here)? I have now checked my other computer (TcXaeShell) and I don't have that option.

Refactoring.png
 
That's the problem exactly. I am using TcXyeShell. When I tried the same thing in Visual Studio everything works well.

Thank you very much for your help!
 

Similar Topics

Hi! I am trying to run the 'SimpleSample' (https://infosys.beckhoff.com/content/1033/TF5100_TC3_NC_I/Resources/3438746891/.zip ) to understand the...
Replies
2
Views
96
I am developing a library in twincat and one of the function uses IID_ITcVnAccess_TcVnPoint2_DINT and the definition of this type is defined in...
Replies
0
Views
69
Sorry if this has been asked before, and apologies if this seems like a trivial issue, but I am new to Beckhoff and have been banging my head...
Replies
2
Views
141
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
953
I am trying to communicate between a 1769-L16 and a beckhoff EL6652 EtherNet/IP-Master. I need 8 INT and 2 REALS. When I generate the eds file, in...
Replies
1
Views
161
Back
Top Bottom