I'm in a situation where we have launched a layer witch hunt for this I already have an excel table that lists all my drawings on the server and I would like it to be able to know from excel if the listed drawing has a layer so connection between excel and Solidworks to establish and especially what to use to know the presence of layers
And then search for the layer in question in the list obtained.
It may take a long time. Because you have to loop and open all the MEPs of your servers. From experience, this requires regularly emptying the memory of the SW process. In VBA I think you will be forced to restart SW regularly.
Otherwise, even if it's not really the question, why not do it with the mycad tool integration software you have?
It all depends on what you want to achieve next.
Otherwise, from your excel file, you save the list of files in csv that you then import into integration, you search for your layer with the function if the plan contains a particular layer name and then you delete this layer, you rename it or you simply list the files that contain this layer and all this without having to do a macro and in addition you can program the emptying of memory each time you close your plans.
sbadenis I didn't know this tool I'm looking at it right now but it seems extremely slow to me compared to Excel :/ I'll see if in operation I can tell it to run a macro that deletes all the layers