Macro save part as with path and prefix pre-filled

Hello
Every time I integrate an element from the library into an assembly, I have to repeat the following steps:

-save as
-specify the working folder
- add prefix "business number"
-add suffix "revision index"

by dint of it, it is tedious and a source of errors.
I'd like a macro that allows me to do these operations faster.

SOLUTION 1

The work folder information, prefix and suffix being the same throughout the project, I thought that opening a pre-filled window with the values previously used would be more than enough.
1 ) I launch the macro, a dialog box opens with 3 pre-filled fields
2 ) eventually, I modify the fields (only when I change folder)
3 ) I validate

SOLUTION 2

Another solution that would be really great but perhaps more complicated would be to place my library items in my assembly without saving them in my working folder and then, to run a macro in the assembly that searches for all the parts coming from the "c:biblio" folder and saves them in the working folder with prefix and defined subfix.

SOLUTION 3

I should point out that I have the mycad suite, which I looked for but couldn't find a way to do this. If you have a suggestion using MyCAD, I'll take it too.

Thanks for reading

I find it very surprising to copy library parts in a case, you have to multiply the number of identical parts on your hard drive unnecessarily!

But in principle, you should be able to do this with integration (Mycad tool):

In the conditions take document then if the document belongs to a specific folder (c:\Biblio)

Then in processing in part export and choose export file (.sldprt) and modify the naming rule.

Then you just have to open your assembly and start integration.

The processing will be done only for the target part (c:\biblio).

1 Like

Super.

I had explored this avenue without success, the renaming + save as was done, but not the replacement in the assembly.

But if you keep the assembly open, the replacement works

Thank you very much!

Let's push the envelope a little more:

Is Integration able to retrieve the path of the folder in which my assembly is located, as well as the first 4 characters of its name to modify the naming rules accordingly?

Now I don't think you can do that without going through a macro.

And why copy the library pieces if it's not indiscreet?

Error in mn comment in renaming rule (option tab) by clicking on advanced you can create a rule to add or replace the name of the folder for this click on the 3... then windows value and folder name and for the 4 characters of the name just take delete the characters from and choose 4

"And why do you copy the library pieces if it's not indiscreet? "

That's how it goes in my company. We make special machines. We do about a hundred studies per year.

Each cartoonist has a copy of the local library (that's a question too: why local? I can't find a valid reason)

For each study, we have all the documents in the working file. It makes for a promising project. What's more, the M8 screw used in the "Chassis Thing" case will have the "u125" mark and the same M8 screw used in the "Cart Thing" case will be able to have the "V451" mark.

 

1 Like