How can I add a count of a custom iProperty to a BOM colum?

How can I add a count of a custom iProperty to a BOM colum?

Anonymous
Not applicable
413 Views
1 Reply
Message 1 of 2

How can I add a count of a custom iProperty to a BOM colum?

Anonymous
Not applicable

I posted this question to the regular forum just in case but my guess is I'll need to do this using VBA and if so don't know where to begin.

I want to have several iParts each w/ custom iProperty values like new, existing, relocated etc. to an assy.  Then I'd like to add up all the new and place that into the BOM.  So I'd have for part01 a column showing 2,3,0 for new, existing, and relocated.  I could combine each occurrence by having all of them have the same part number. 

So far I've been able to add a column with the custom column but none of the values show up.  Does anyone have a way to do this?

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

mslosar
Advisor
Advisor

I'm not sure i completely follow, but I partially follow 🙂

 

In the case of

 

BALLOON     PN      NEW   EXIST  REL

1               001        3

2               001                    2

3               001                            1

 

Using the BOM to merge the rows would give you

 

4              001      varies   varies  varies

 

Though 4 is easily renamed.

 

I know you can use SUBSTITUTION in the column properties of the Parts List and SUM VALUES when the variable is present. That's usually used for summing things like mass when you have, say, 8 widgets each weighing 3lbs. In that case it sums that weight to 24lbs. Not sure how that'd work in this case as i've never tried it.

 

I just build up a idw/iam setup to test this. I got 1/2 way there. I made two parts, one for 'new' and one for 'exist'. Placed them randomly in the iam. Each part had NEW and EXIST custom properties. When giving each part a separate part number, it totalled those columns just fine. However, when i gave both parts the same part number it just generated *varies* because the values don't match part to part.

 

The only way I can think of you could probably do this is to have properties in your parts to identify them as you list, but then a separate set of properties to display in BOM. You could run a script that found all the parts you're after and tallies their number and then write that to the other variable in the ipt file. Only problem is you probably can't write to the ipart and even if you could, you'd have to write it down to each part so that they all have the same number to display in the BOM. You could get around that, i suppose, by having the script that counts them write the total down as a static value in the parts list, but i don't know that that is opened up to us to do in ilogic or vb. My recollections is you can kick the BOM out, but not really mess with it directly much.

 

Another method would be taking what you already had and removing New, Existing, Relocated from the BOM and adding that info as a seperate table. You could parse through all your parts, find the matching parts and tally their values and display it in that table as it only has to be written to that table only.

 

0 Likes