Possible to export a particular BOM format (for MRP) with an iLogic rule?

Possible to export a particular BOM format (for MRP) with an iLogic rule?

claudio.ibarra
Advocate Advocate
3,288 Views
23 Replies
Message 1 of 24

Possible to export a particular BOM format (for MRP) with an iLogic rule?

claudio.ibarra
Advocate
Advocate

I'd like to create a button (a rule fired from a Global Form) that produces an XLS BOM sheet ready to copy into our MRP system. Right now, the members of my team export a BOM using the Export feature, and then manually make some formatting edits to prepare it for the MRP system. It's time consuming, and the edits they make follow some simple rules, which screams "automation" to me.

 

A typical unedited Parts List export might look like this:

Annotation 2020-02-13 093753.jpg

 

The steps the team members take are:

  1. Delete "Description" and "Mass" columns entirely.
  2. Delete any row with a blank cell in the "Keywords" iProperty column.
  3. Add a column before the "ITEM" column titled "MATL"
  4. Set the "MATL" column equal to 10X the "ITEM" column.

So the above "pre-edit" example would finish like this: 

Annotation 2020-02-13 094400.jpg

 

That's it. Is it possible, if a "BOM.xls" or "BOM.xlsx" already exists a user's desktop, that an external iLogic rule called from a Global Form can add a sheet to the Excel file with the drawing filename (without extension) as the sheet name, pre-formatted as described above? It would save a lot of time in the long run. 

 

Annotation 2020-02-13 095151.jpg

 

Thank you in advance to anyone who reads and/or helps! 

0 Likes
Accepted solutions (1)
3,289 Views
23 Replies
Replies (23)
Message 21 of 24

A.Acheson
Mentor
Mentor

@bsnyderACLUW 

Did you change the Category of the property sets  from Inventor Summary Information to Design Tracking Properties? I didn't at first but then I read this article  and it worked for me. 

https://knowledge.autodesk.com/search-result/caas/simplecontent/content/list-all-iproperties-and-how...

 

See attached .txt with the working code for your export. I switched the export to look at the material iProperty as this is always populated so this will give you a full BOM list. If you want to pre filter it you could go back to the keyword method. I  have commented out anything I changed on the  original and placed (AA) beside anything that I added. So it should be very easy to get back to the start. 

 

Kudos to the original designers it is super fast. Sorting the data is another task as I would need to study that more. 

 

In future so you can get more eyes on the topic it would be easier to put up a new post  and link this post as this one is all ready solved.

 

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

bsnyderACLUW
Enthusiast
Enthusiast

so I finally got this working on my end after some fiddling with it. 

 

I do need some information if anyone is able to give it.

I need to set up the strings for material, part number, quantity, and Description.

I don't need a re-work of the posted code just what I need to call these values. ex:

thank you, 

 

Dim Keywords As String = getIProperty(cDoc, "Inventor Summary Information", "Keywords")

 

0 Likes
Message 23 of 24

A.Acheson
Mentor
Mentor

@bsnyderACLUW 

 

 ilogic strings are listed in the snippets in the rule editor for all but Qty, that looks like it is linked to the BOM. 

 

List of iproperties shown here. 

https://adndevblog.typepad.com/manufacturing/2018/04/accessing-iproperties-through-ilogic-code.html

 

Also you can call each one  through the (API) see attached photo from the the API Help 

 

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

bsnyderACLUW
Enthusiast
Enthusiast

@A.Acheson 

 

Thank you so much!!!, this is exactly what I needed and some great useful information for the future. Thank you. 

0 Likes