- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would much appreciate some support. I suppose I could pay someone to help me out, but I don’t just want the job done, I would like to learn iLogic also. I need to create an internal Part Number for our company. The code would run at an Assembly level over all parts included, but it isn’t needed for assemblies / sub-assemblies.
The part number is composed of various digits that have certain meanings. Best would be to populate these from an Excel spreadsheet and it would be better to have it as an external rule, in case changes would be needed, they’d be easier to implement. It is a 14-digit part number.
- The first digit is material type. This I would pull from the iProperty.Material. For ex: 1 (for steel), 2 (for stainless steel) etc.
- Digit 2,3 has the shape type of the part. For the content center parts I would add a text user parameter called “Shape” in the family template file, which would be filled in accordingly. In the code I would need to verify if the user parameter “Shape” exists and add those corresponding 2 digits to the Part Name. For example if Shape=”Sq Tube”, then digit 2,3 should be 01. If it doesn’t exist it would need to open a message box with a drop down list to add it. Is it difficult to do this for many parts? Is there an easier way to do it? Can I attribute the digits by fetching the family name of the shape?
- Digit 4,5,6 refer to one of the dimensions of the shape. For box tubing, for example, I would pull it from the “G_W” value. For Pipe, from the “Diam” value. For sheet metal it would be “Thickness” (all without dots of course).
- Digit 7,8,9 are a second dimension of the part, like “G_H” or one side of the flat pattern of the sheet metal.
- Digit 10-13 are a third dimension of the part. For sheet metal it would be the other side of the flat pattern extent.
- Digit 14 is for an optional entry. I would have to write a new text user parameter to each part called “Opt_Digit” in case it would need to be populated. If that is left empty, then by default the new Part Number would write in “0” for the last digit. If it is populated, it would write in that digit. The space for the parameter “Opt_Digit” can only be 1 though.
I realize it’s a high tally, but if anyone wishes to help, I would be very grateful. Maybe there are better ways to accomplish this altogether, I don’t know. Meanwhile, I’ll keep stabbing at this thing as I can.
Thank you much!
Solved! Go to Solution.