Project management and modification without PDM

Hello

I'm looking to have a customizable app or macro that allows me to copy a complete project by indicating more or less automatically the files and plans that have been modified.

In more detail:

1 I have an existing product, with associated parts, assemblies and drawings, all in read-only mode to avoid bad handling.

2 I copy the entire project with a composition to take with the plans in a new "Project" directory while keeping the structure.

3 I apply all the changes/creations on my project in this directory which has kept the structure of the initial product

4 Once validated, I want to switch this entire "project" directory back to "product" en masse by indicating the files that have evolved or are newly created, with their associated drawing (having the same name as the source file and in the same directory as it). The best thing would be that if I change the index of a part, it offers me to change the index of the assembly in which it is used (but that will be in a second step)

5 I archive the old files in another "archive" directory so as not to clutter the "product" directory (with a PDF processing by the way as a precaution)

 

This is the objective of my approach, which resembles simplified PDM. It is phase 4 that poses the most problems, of course.

To complicate things, I have to work with SW2011, for compatibility reasons with some users.

 

To date, I've tried to dig into it with projectmanager, but no automated processing of the index change possible because the files have names mixing numbers and letters and the detection rules are too closed (at least on V2011). In addition, there is no save in the app, which would allow you to redo the manipulation later or correct it.

With integration, no processing on the file names. Possible to test, but no operation.

I turned to Lucas Prieur's "save as" macro, to be automated to process a specific file syntax, but also remains to find how to process a complete group of files.

 

I therefore ask for your skills in more advanced use of existing apps or in writing macros in order to move forward in my project. Unless you have another methodology to propose.

 

Thank you.

Sebastian

Hello

 

I adapted the existing macro to run it on a folder, just open a file in the folder to run the macro for all the pieces in the folder.

 

Consider enabling "Microsoft Script Runtime" in VBA "Tools > References".

 

I also adapted the macro a little following our email exchanges.

 

Hoping it works!


enregistrer-sous-masse.zip

for your phase 4 (thank you ants)  

What for?

if you take all the files in the folder and you open it

2 I copy the entire project with a composition to take with the plans in a new "Project" directory while keeping the structure.

 

_donc the ref folders are the same as before modification since you are going to make these said modifications

we are coming to phase 4

you rename your file its name +1 you save

you end up with 2 folders 

1 with original name, 1 with original name +1

 

you reopen your origin you rename it +A (archive)

and you put it in your archives once printed

 

Personally I think that all changes deserve a hint, Date

 

@+ ;-)

Hello

 

With the Integration utility, you can run a macro.

 

The tool will open each document, launch the macro, save and close the document.

 

This simplifies the macro.

 

A+

 

3 Likes

If I understood correctly:

  • Point 1 is your standard product and therefore your basis for the development of the customer product.
  • In point 2, when you duplicate in "PROJECT", you rename your SolidWorks files?

(If you don't rename in my opinion it's super dangerous: SolidWorks doesn't like duplicate files !!)

  • In point 3: if you modify an existing part (from your standard database) it means that you index your part, how do you manage it (with properties in the part?) or do you rename the file with "name of the fichier_indice"?
  • In point 4, why not simply rename the "project" folder to "product"?

 

For "The best would be that if I modify the index of a part, it offers me by itself to modify the index of the assembly in which it is used (but it will be in a second step)": here I think we shouldn't dream, even the EPDM it doesn't do it by itself!!!

  • 5 You archive: that is to say that you make a copy of the "project" directory (keeping the same numbering? so creating new duplicates?).

 

 

 

first:

Lucas' macro throws me when I have to fill in the name of the new file (but  didn't offer me to choose a directory). She came once after choosing 8 digits for the new name but asked me for the name a second time (7 digits this time).

In the end, I was able to transform my file which was called 02-P10866 into 01234567-1234567. Not that yet, sorry. I'm going to try to figure out how to do it on my own after studying all the answers (which I didn't expect so many I admit).

Second:

I didn't understand the "+1"

When I transport my take-away composition from the project to the production, I would like him to offer me each time:

"This file already exists, do you want to keep the existing one (choice 1), keep both (archive the old one and increment the index of the new one)" in the way of Windows, but associating it with the drawings with the index that follows that of the source file.

I hope to be intelligible...

in three:

I hadn't thought of using a macro in integration, a path to explore. It's a shame that filename operations are not offered as standard. However, this utility does not offer to save the procedure to apply it later. It's a "one shot", at least in 2011.

I modified the macro I posted here to take into account your syntax normally!

 

And you have to launch the macro called "main" to have the choice of a folder.

 

Edit: Sorry, indeed I had forgotten part of the code, it needs to be modified:

 

 

Loop While Len(NewCode) <> 8

 

 

By:

 

Loop While IsNumeric(Left(NewCode, 2)) = false and IsNumeric(Mid(NewCode, 5, 5)) = false and mid(NewCode, 3, 2) <> "-p" 

 

 

 

last:

In point 3, I don't change the names of the files. So I do have all the files in duplicate between the work base and the project base. Those in the work base being read-only to avoid nonsense. The management of the index is done on the file name directly (syntax: product type on 2 digits + dash + "P" + product subtype on 1 digit + A if assembly + part number on 3 digits + index (nothing or A or B ...) If it's a part file, no A, the part number changes to 4 digits + index.

It's only when I decided to validate the solution and apply it that I change my index or create a new code by switching back to the original directory.

I don't handle the index by properties (maybe a mistake, not the habit).

When returned to the initial directory in phase 4, the entire project has become a product and the previously copied project can be deleted or archived/compressed to avoid duplicates. The archiving of the previous index is there so as not to pollute the directory with old indices, it is only a file move (part + assembly + plan).

An idea that comes to mind:

 

  • Item 1:

The existing product: All filenames (PRT,ASM,DRW) start with "STD_" (for Standard).

You add on each of the files (asm,prt) the "ETAT" property with only 3 possible parameters (it's easy to do from the smartproperties):

  • Standard
  • New
  • Altered

Note: in your existing product all files are in the "Standard" state

 

  • Item 2:

You make your take-home composition by renaming all the files (prt,asm,drw): you replace the "STD_" prefix with the "PROJET_" prefix (so no duplicates !!) and you store them in the Project directory.

 

  • Item 3:

You make all your changes.

If you create a new part: in the STATE property of the file, you assign the value: New

If you modify a part: in the STATE property of the file, you assign the value: modified

If you don't do anything on the file.... you don't touch anything since the state property will remain in Standard

 

  • Item 4:

Once validated, you make a take-home composition by renaming all the files (prt,asm,drw):you replace the "PROJET_" prefix with the "PRODUIT_" prefix (so still no duplicates and you keep an archive of your work in project  mode !!) and you store them in the Product directory.

So you can bulk print or create DXFs via Batchconverter by filtering via the STATE property.

You can use Propertielist to list all your files and extract the New and/or Modified ones (Create a table with a STATE column).

 

Have I been clear?

Is that okay with you?

 

 

This "state" solution seduces me quite a bit, but I have two small objections:

- I can't change the names of the current files (taken up by excel macros or by purchases I think). But that doesn't prevent anything, I can just add a temporary prefix for the duration of the project.

- I have to manually change the index of all the modified plans (unless I automate on the "STATE" property). So back with the "save as" macro maybe?

At the same time, I think I'll have to find an automatic solution to change the STATE property during transfers / creation so as not to have a failure if this property forgot to be filled in/modified before processing. I have to think about it with a calm head, interesting.

Thank you.
Sebastian