Global form edit iproperties parts in assembly

Global form edit iproperties parts in assembly

wouter
Advocate Advocate
473 Views
2 Replies
Message 1 of 3

Global form edit iproperties parts in assembly

wouter
Advocate
Advocate

Hi,

 

I'm having trouble editing some iproperties from parts that are in an assembly.

We all ready have a rule that fills in some iproperties in the parts run from an assembly, and now i wanted to add stuff like article codes for purchase parts.

 

Easiest way i thought would be a global form that is called on within the for each loop in our rule.

When i run the code in an assembly it does show the correct part info.

However if i fill in the boxes it changes the iproperties of the assembly instead of the part.

 

Now i created a workaround with an inputbox and writing the info to the parts iproperties using a local variable,

 

Leverancier = InputBox("Vul hier de levencier in van:" & vbLf & iProperties.Value("Project", "Stock Number") & vbLf & iProperties.Value("Project", "Part Number"), "Leverancier") iProperties.Value(BestandsnaamMetExtentie, "Project", "Vendor") = Leverancier

 

Long story short, is it possible to change iproperties from parts that are in an assembly via a global form?

 Form input.PNGGlobal form.PNG

kelly.young has embedded your images for clarity.

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

mcgyvr
Consultant
Consultant

In general to assign values to the iproperties of components you need to use this..

SyntaxEditor Code Snippet

iProperties.Value("part1:1", "Project", "Part Number")

vs

SyntaxEditor Code Snippet

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

 Including your code is FAR better than including images..

Someone can just easily update your code for you vs having to guess what code you have.. 



-------------------------------------------------------------------------------------------
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
0 Likes
Message 3 of 3

wouter
Advocate
Advocate

Thank, but i allready used this in the workaround with BestandsnaamMetExtentie being a variable:

 

iProperties.Value(BestandsnaamMetExtentie"Project""Vendor")

 

But as far as i know you cant see code or do anything with it in a global form which i would prefer to use

 

 

 

0 Likes