Automatically change Stock Number of the part if any of its parameters are chang

Automatically change Stock Number of the part if any of its parameters are chang

bhattarai_suyesh
Contributor Contributor
538 Views
2 Replies
Message 1 of 3

Automatically change Stock Number of the part if any of its parameters are chang

bhattarai_suyesh
Contributor
Contributor

Hi,

This is my first post on the forum, hope i have the correct board.

 

I have been working on standardising components for a product line at my company. I have come up with a range of standard products. But the company also does bespoke solutions. 

For bespoke solutions, some parts will remain the same as the standard parts and will hence have the same stock number. But some parts might change, for eg. the ribs used to support the lintel beam will change when the Lintel beam changes. The method we follow for the bespoke solution is, we copy the design from the nearest standard product and make edits to it. Now, the stock number for each part is the same as the standard product. But when the engineer starts making edits, the stock number will not change. 

 

Is there a way with ilogic by which we can monitor if any changes are made to the parameters of a part and accordingly delete or edit the stock number? 

 

I know we can change the stock number with ilogic but the missing part is "identifying if any parameters have been changed". 

 

 

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

bhattarai_suyesh
Contributor
Contributor

I kind of got the solution.

 

A external rule

iProperties.Value("Project", "Stock Number") = iProperties.Value("Project", "Part Number")

set to trigger at any Model Parameter Change. 

 

Does the trick for me. 

 

0 Likes
Message 3 of 3

mcgyvr
Consultant
Consultant

@bhattarai_suyesh wrote:

I kind of got the solution.

 

A external rule

iProperties.Value("Project", "Stock Number") = iProperties.Value("Project", "Part Number")

set to trigger at any Model Parameter Change. 

 

Does the trick for me. 

 


Why don't you just forget there is even a stock number field and just reference the part number field in everything then? No code needed at all to do that.

If that code works for you then great I guess but it seems kind of goofy to just set something the same as something else when you could just use that something else from the start. 

 

Do you have other parts where the stock number isn't the same as the part number maybe?



-------------------------------------------------------------------------------------------
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