Parameter Change to New Part Number

Parameter Change to New Part Number

liamgibbons11
Explorer Explorer
166 Views
1 Reply
Message 1 of 2

Parameter Change to New Part Number

liamgibbons11
Explorer
Explorer

Hello,

 

I am trying to write code in a top assembly in which it checks when a certain part number has changed, this part could be in top assembly or any subassembly.  I want the parameter function to call for that new part number. Note that the part is the same and no parameters have changed, just that "Part1:1" was 'Save As' to the new number "Part2:1". Here is a brief example below as to what I need to happen.

 

Parameter("Part1:1", "...")

' New part #

Parameter("Part2:1", "...")

 

I cannot figure out this.. at all, any help would be greatly appreciated. I am using Inventor Pro 2017 

 

Thanks a lot!

0 Likes
167 Views
1 Reply
Reply (1)
Message 2 of 2

A.Acheson
Mentor
Mentor

Hi @liamgibbons11 

Can you explain in more detail what you want to achieve? Some screen shots of in position parameters and or past the physical code. If the part document is been replaced then your parameter retrieval which relies on the occurrence name  will not know what your new part document Naming scheme is. 

 

In these cases you normally stabilize the occurrence name and this allows a consistent occurrence name in the code. 

 

Example stabilizing occurrence name to part1. Now your filename can be changed without effecting the code reference to the document. 

 

Parameter("Part1", "...")

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes