Renaming according to properties

Hello
I'm looking for a macro that can rename my files based on their custom properties and pieces of invariable text.
Example, with the following properties
Reference: 000-AB-000
Designation: Bidule
The file should be renamed
000-AB-000 - gizmo - XX
( " - " and "XX" being invariable)
In addition, this renaming should only be done on prices whose "Component Family" property is equal to 1 or 1-2.

I have the smartproperties module, but there is no way to do it simply. you have to make a whole bunch of rules and no way to save them :/
I came across topics dealing with renaming, but a little different. Not being really good at macro, I prefer to ask you than to spend a  day to get nowhere.


Thank you in advance

2 Likes

Hello

Have you already started coding something?

2 Likes

Hello

What context are you in:

 - Naming of export  files (e.g. DXF or PDF from SW document):

        Then you can use the BatchConverter tool from myCADtools.

        You can define a name in the naming rules by concatenating properties with conditions.

- Naming new files: 

       SmartProperties is the right tool. It names the file with the value of a property. You just need the property that allows you to name your file to change according to your Component Family value . In this case you can use a conditional type to define your no

- Renaming of existing files:

        If you want to rename existing files, you have to be careful because the assemblies that reference this file will no longer find it. In this case, there is the ProjectExplorer tool that allows you to rename documents by recreating external references. You will find in this tool the same naming rules as in BatchConverter (myCAdtools 2016 only)

 

A+

 

Philippe

3 Likes

Thank you

I'm going to look at it in a few days