Find out from Excel if a Blueprint has layers

Hello

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

Thanks in advance:)

Hello

I see that you put the SolidFace tag to your question. What software is used?

2 Likes

Oops error not awake this morning This is a link to be made in EXCEL and SOLIDWORKS and not solidface :/

I think you should be interested in the LayerManager and especially its GetLayerList method.

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.

1 Like

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.

4 Likes

Well done sbadenis !

It is indeed much simpler. ;-)

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

This tool is very powerful for repetitive tasks.

For what you want to do, import your csv file with the list of all your drawings (or cut into several csv files if too large)

Then you modify the attached rule at your convenience (my cadtools 2016)

Just replace the slap names in conditions and operations with your layer names and it should work.

 

EDIT: after proofreading you just have to put star (*) in the 1st operation so that it deletes all the layers.

So then delete the 2nd operation that has become useless

 


suppression_de_calque.mcact
1 Like

Thank you sbadenis for making me discover this tool, I just have to wait an hour for it to process the 15000 plan :)

1 Like

I think you'll have  a little more than an hour then!

2 Likes

Is there a setting to check so that the Solidworks instance that myCAD Integration uses is not visible? Would it maybe speed things up a bit?