Numbering per folder

Numbering per folder

Jens.Bruhn
Enthusiast Enthusiast
1,696 Views
9 Replies
Message 1 of 10

Numbering per folder

Jens.Bruhn
Enthusiast
Enthusiast

Hello all,

 

I have a special request for file numbering in vault...
We have vault folder names like '100 - Drehteile', '200 - Brennteile' and so on.
In each folder the filenames have the same prefix as the folder name, for example <100-10025.ipt> or <200-10650.ipt>.
I'd like to generate the highest number per folder when a new file is created in Inventor.
I could define an numbering scheme for each folder, but I think with more then 20 folders this is not very smart.
Maybe someone has a better idea with DataStandard?
Can I generate this special number, when the user choose the folder name in the Inventor DataStandard dialog?

 

Thanks all,

 

Jens

 

0 Likes
Accepted solutions (2)
1,697 Views
9 Replies
Replies (9)
Message 2 of 10

COOLORANGE
Participant
Participant
Accepted solution

Hi Jens,

 

I believe it is possible. In Default.ps1 there is function called OnPostCloseDialog. In this function, you have the chance to rename the file like this: $Prop["_FileName"].Value = "New File name.ipt".

 

To collect the prefix from the folder, use the $Prop["Folder"].Value.

 

Finally it could be something like this:

 

$Prop["_FileName"].Value = $Prop["Folder"].Value + $Prop["_FileName"].Value

 

Note: I haven't tested it. But I hope it helps you get in the right direction!

 

Wangdu

 

coolOrange

www.coolOrange.com

0 Likes
Message 3 of 10

Jens.Bruhn
Enthusiast
Enthusiast

Hi Wangdu,

 

thanks for your reply.

With your snippet I can get the prefix from the folder but not the highest file number in this folder.

I solved the problem now with individual numbering schemes because there where too much existing files with individual numbers in different folders.

 

Thanks again for your note.

 

Jens

 

0 Likes
Message 4 of 10

Markus.Koechl
Autodesk
Autodesk

Hi Jens,

you can achieve this easily by the use of a numbering scheme with prompted text, e.g. ?-#####. 

With that you will get individual numbering sequences for each folder.

 

The prompted text (?) = folder number.

There are two approaches to solve this:

1) follow the Vault help example (end of article) and replace the argument "Title" by your number: http://help.autodesk.com/view/VAULT/2016/DEU/?guid=GUID-40E6D520-2E85-46F2-AFD1-89EEBBD06936

 

regards,

Markus



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 5 of 10

Jens.Bruhn
Enthusiast
Enthusiast

Hi Markus,

 

good idea, thanks for this.
I wanted to get the highest number per folder and not over all. So I created an individual numbering scheme per folder.

 

Thanks again and best regards,

 

Jens

 

0 Likes
Message 6 of 10

Markus.Koechl
Autodesk
Autodesk
Accepted solution
Hi, I am wondering that why you need more than one scheme. The prompted input causes the sequence to restart automatically for each individual number.
?-##### should result in
1) 100-00000, 100-00001...
2) 200-00000, 200-00001...
Eventually still a hint to optimize.
Thanks,
Markus


Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 7 of 10

Jens.Bruhn
Enthusiast
Enthusiast

Hi Markus,

I tested it with a scheme like you suggested - you are right!
I wasn't aware that the prompted input causes a restart of the sequence.
Thanks a lot and best regards,

Jens

 

0 Likes
Message 8 of 10

Anonymous
Not applicable

Hi Markus

 

I am sorry i know this has already been solved.

 

Is there away to do this through vault when creating a new file in a new folder, which will reset the numbering scheme using data standard to create the new file in vault.

0 Likes
Message 9 of 10

Markus.Koechl
Autodesk
Autodesk

I am sorry, but I don't see what you are looking for differently to the previous question and solution. Can you share a step by step workflow description?



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 10 of 10

Anonymous
Not applicable

Hi Markus

 

Sorry i manage to sort it out late this afternoon.

 

I thought the option only worked in the data standard inventor add in, but i see it also works the the vault data standard add in.

 

sorry for wasting your time.

 

Thanks.

0 Likes