Developer Portal Community

    Showing results for 
    Search instead for 
    Did you mean: 

    TwinCAT3 collaps only to folders

    New Poster

    TwinCAT3 collaps only to folders

    If you work a lot inside TwinCAT3, in the solution explorer window a lot of folders will be expanded to see step chains, structures,  and so on.

    At some time it is getting extremly annoying scrolling through all of the trees. So there's is no overwiev at all left in the solution explorer window at all, especially for big projects.

    So my question is, how can I get an ovewiew again in this way that all expanded folders which have structs or chains directly under this folder will be collapsed? See picture below

    Or is there another solution ?

    Thanks a lot.

    Thats the way it should look after collapsing.


    4 REPLIES 4
    Community Moderator

    Re: TwinCAT3 collaps only to folders

    I don't think there is such a functionality. The only possibility I know of is this button:


    But this collapses everything up to the project, so you need some clicks to get back to the "interesting" places.

    Established Member

    Re: TwinCAT3 collaps only to folders

    I know the pain that you are talking about. What I found is that the problem comes from TwinCAT automatically expanding the solution tree items too much when jumping around many files, especially when you are using the Search function or something like F12/Shift+F12 (Cross referencing).

    To avoid this problem, I deactivated this setting:


    This greatly helped me to remove the visual clutter. You may want to try disabling it, if you currently have it enabled. The downside is that it may sometimes be difficult to find where exactly something is actually in the solution explorer, but I rarely need to know this actually in a well-sorted project.


    Re: TwinCAT3 collaps only to folders

    For big projekt the filter is a possible way to get a better overview



    Community Moderator

    Re: TwinCAT3 collaps only to folders

    I'd like to add a few more "solutions" to the problem:

    1. With the keyboard key "" you can collapse the current folder. For me it works good using the arrow keys "up/down" and collapsing with "left".
    2. "Track active item" (@MarvinW) is not set by default, but during the training it is recommended and set. I think it helps beginners in the orientation because then the selection in the solution explorer and the open document are the same.
      If you deactivate this option you have to read the name of the open document carefully and ignore the selection in the solution explorer:

      If you deactivate "track active item" I recommend you one of the following options:

      1. Open Tools > Options in the menu bar and choose a shortcut for "View.TrackActivityinSolutionExplorer", for example with shortcut CTRL+T.
        Everytime you press the shortcut, the currently open document will be selected in the solution explorer. So instead of the automatical selection you can choose when the solution explorer follows your open documents.
      2. Activate the button "Preview Selected Item" in the solution explorer. It opens the documents (methods, FBs, ...) with just one click on the right side: