Stock Number iLogic

Stock Number iLogic

Cosmin_V
Advocate Advocate
867 Views
2 Replies
Message 1 of 3

Stock Number iLogic

Cosmin_V
Advocate
Advocate

Hi.

It is possible to write a rule which, when I "copy design" the assembly, the prefix to be add to my Stock Number?

And if is, it can be for ex.

If the prefix is "001-" the Stock Number to be "1"?

If the prefix is "002-" the Stock Number to be "2"?

0 Likes
868 Views
2 Replies
Replies (2)
Message 2 of 3

mcgyvr
Consultant
Consultant
'get the part number prefix
Prefix = Left(iProperties.Value("Project", "Part Number"), 3) 'first 3 characters only

'remove leading zeros
tPrefix = Prefix.Trim("0")

'set Stock number as trimmed prefix
iProperties.Value("Project", "Stock Number") = tPrefix


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 3 of 3

Cosmin_V
Advocate
Advocate

Thank You     

But this is not what I ask for.

I want when I do COPY DESIGN.... from Vault, the prefix to be the Stock Number.

In firs post I was wrong about how it can be, the prefix….sorry for that...

The prefix would be like this

"0001-" or "0021-" or "0321-" or "4321-"

but the Stock Number should be without zeros and  -.   "1", "21", "321", "4321".

0 Likes