Rename solidworks files

Hello

I work with SolidWorks PDM Standard 2017, and MyCADTools.
Currently, I have a lot of duplicate names, following a massive data import into the PDM.
Duplicates are usually in V01, V02, etc. which were used to make alternative designs.

Today, I would need to RENAME the files, WITHOUT COPYING THEM (because I have to keep the history, revision, state, etc), but in batch (several thousand files), and with rules: Replace V01 with V02 for example, or add a suffix.

What is the right tool for this?

I've already done many tests (Project Explorer, Copy Tree, etc), and I just haven't found the option I'm missing!

Thank you in advance for your enlightenment;)

Bjr,

With PDM I use move tree, but I stay in the same folder and use the replace with function

The files that I rename that remain in the same place are in yellow line, and I uncheck any other file that could be taken by mistake (e.g. screws, trade,.... )

 

2 Likes

Hello

Indeed, it is the tool that seems to be the most suitable, but it is unfortunately only available with PDM PRO, and I use PDM Standard...

Whether or not the files are extracted from the vault, renaming with Project Explorer COPIES the files, it does not rename them...

Smart Properties can't rename them: the "renaming" options are only there for the naming policy of the copied files. 

Project Manager will also copy the files, not rename them. There is an option to connect to the PDM, but this is only possible with MyPDMTools, which is only available with a PDM Pro...

So, I still don't have a solution with my Standard PDM !!

Hello

If no existing tools do what you want, then you may want to consider the "Homemade" method and for that an Excel macro should be able to do the job. Your Solidworks/PDM reseller should be able to help you with this if you don't have enough knowledge of vba.

I don't know if standard PDM is also handled by APIs like PDM Pro and if it doesn't you may have to extract all the files manually before processing and then archive them manually.

[EDIT] maybe a bit more complicated than that, apparently standard PDM doesn't work with APIs like PDM Pro.

Kind regards

1 Like

Hello

Why not duplicate with Project Manager to a temporary disk, delete the folder you wanted to rename and put your renamed copy back in the right place?

Moreover, it seems to me less dangerous than renowning directly and risking making mistakes.

1 Like

Hello,

Thank you all for your contributions!

@d.Roger

Indeed, the Standard PDM does not have an API... So a macro "in the PDM" is not possible. I've tried traditional tools with extracted files, and even offline, but the renaming tools do a COPY, when the files are in the PDM.

@sbadenis

I want to rename WITHOUT COPING, to keep the history of my files (who created it, who validated it the first time, etc.). And the PDM keeps the versions, so making a mistake is not a problem;)

@joel.condevaux

Thanks for sharing. At home, the tool launches with an error, and it doesn't list anything... Maybe because I'm on Windows 10? I'm not an administrator of my computer, but I don't think that's it... I'll gladly send you the full error message if you are interested (Unhandled exception - unable to create the ActiveX component). But if it goes through the SolidWorks API, I'll have the same problem as with Project Explorer, I think.

 

If I find something else, I'll be sure to update this thread, and if anyone has "the" solution I'm always interested !!

 

 

 

Hello

To download the program you have to go to my website https://sites.google.com/site/bibotacconcept

  1. Download both "Bibotac.exe" and "Bmpextract.swp" files
  2. Copy them to a directory on your "C"
  3. Launch Bibotac
  4. Select the folder to index
  5. Use the mass renaming functions.

I never took the time to finalize the French version but I remain available for any explanation.

 

Joel.

1 Like

Hello;

The solution of  sbadenis seems to me the most relevant. (ProjectManager).

Also check the options of your PDM (you must allow the renaming of files) otherwise the duplication is implicit.

2 Likes

Hello

Do you have access to the "Dispatch" add-in in your version of ePDM? This allows you to create small scripts via a (rather limited) graphical interface. I created one in our implementation that renames one or more SOLIDWORKS files from a variable containing a unique reference via a contextual command.

By using a program external to the PDM, I fear that updating the references between files (like when renaming manually) will not be done.

Kind regards

Julian

1 Like

Hello @Maclane,

Manually, I can rename the files. Is there another option to enable/allow, for "external" script/program renaming?

If I have to go through a copy, I prefer the "Copy tree" of the PDM, but there too I lose the history... So unfortunately the Project Manager doesn't bring me the renaming solution, despite it being an excellent tool.

Hello @julien.marcer

The "Dispatch" add-in is only available with PDM Pro (formerly EPDM / Enterprise PDM): http://help.solidworks.com/2017/French/EnterprisePDM/Admin/c_add_ins_overview.htm.

So I can't do a macro in the Standard PDM, which doesn't allow access to the API... And with a PDM Pro, I'd probably use "Move Tree"!


Thank you for your interventions - I will continue my tests and research, and keep you informed.

Good...

No solution found.
The solution I'm going to apply is to extract the files and then rename them in the SolidWorks design tree.

Then I use "Integration" to have my ERP number updated from the file name.

 

Enjoy!

Hello

I just saw the subject, if you have the renaming rights on the files it is possible to go through the VBA Excel to rename the files automatically.

To see if it's accessible on PDM Standard because I'm in the pro version, I can always give the snippet of code and references to activate in VBA Excel.

2 Likes

Hello Cyril.f,

 

Are the links updated in the use cases with this piece of code?

I'm happy to do the test, because I'm currently in the PDM evaluation period, so I can crash my data;p

But I'm a beginner in VBA, I prefer to warn! So don't hesitate to give me the details!!

 

Thanks in advance,

Hello

The use cases are updated since this is the classic way of working with PDM. On the other hand, he will normally ask for registrations at the opening because the names have been changed. Then you can use the SolidWorks PDM File Conversion Utility to save the files and thus you won't have these permanent save messages.

For the macro, I attach an Excel file that contains it. If it doesn't work, you'll have to check the references if the reference "PDMWorks Enterprise 201x Type Library" is active (the x should be a 7). This can be found in the Tools> References menu of the VBA editor.

The columns to be populated come from the vault's search results. Depending on your configuration, there may be more or fewer columns, so you will have to modify the column numbers in the macro so that it fetches the information in the right place.

 


renommage_fichiers.xlsm
2 Likes