Automatic name at check-in

Hello, do you know if it is possible to take the name of a folder to integrate it into the name of the file I save inside?
Let me explain: I have a file named 3009. I create a part that I call cube1, and I would like the name of my part file to be 3009-cube1 when I save.
In short, I would like the ownership of the file to be taken from the first registration of my piece.

Hello;

If you have the SmartTools suite from Visiativ you can with Smartproperties.
Otherwise you will have to go through a macro.
To be checked, but I don't think it's possible for saving, with the built-in property editor of Solidworks... with a rule like FileName = FolderName & Designation...

Kind regards.

2 Likes

Hello
I have smartproperties but I first have to save the plan so that it takes into account the name of the file, and so it makes me a duplicate. I have -cube1 and 3009-cube1.

Hello;

Have you tried this?

1 Like

Yes, that's what I did.

On the other hand, in the example, there is PR- in front of the file_name that appears in the record. I don't know where he comes from.

The PR- is surely a mistake (several tries)
How do you recover the folder property? (screenshot please)
Solidworks Variables then Folder? Or another method?
What is the order of your different properties? (screenshots if possible)

1 Like

Please also give us your:
Version of Solidworks used and those of mycadTools

1 Like

I take the Solidworks path variable and then I do " string "


Solidworks 2023, Mycadtools 2022

Have you tried with Solidworks Variables folder? :


In your case, as not registered, no folder, so no string to retrieve on the 1st record.
Not sure that my method will change anything about this problem.
Smartproperties would have to validate the 1st part and retrieve the folder name in the path indicated via the smartproperties and not where the part is saved since it was not saved the 1st time. (Not sure I can be understood with this sentence...)
To be checked...

I didn't try with dossier, because my path is more complex, I had simplified it to present it :).
3009/customer/address/plan

I think I should be able to record while the smart is open

Maybe @fmarchand will be able to answer us about this possibility of retrieving the name of the folder without pre-registration (or part of the folder name as here) or not?

Hello
I don't really see how you can recover a variable that doesn't exist.

1 Like

What if you did it (renaming your files) afterwards with Projectmanager?
Or with ProjectExplorer?

With SW2021 it worked. I validated smartproperties by keeping it open (pushpin), and I saved my plan. At that time, it retrieved the missing information and automatically changed the name of the plan.
It may have been a bug, but for once it was a useful bug.

2 Likes

I'm thinking about it, but it's an extra trick as I try to reduce them.