1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Script Release: Total Cost Center V3

Discussion in 'Alibre Script' started by NateLiqGrav, Nov 18, 2019.

  1. NateLiqGrav

    NateLiqGrav Alibre Super User

    upload_2020-7-15_21-37-42.png

    This script lists and totals the Cost for each part in an assembly based on the value found in File Properties > Part Data > Cost Center. It currently includes hidden or suppressed items (if enabled) but it ignores values in the assembly and sub-assemblies file properties to eliminate duplication.

    Note:
    Use at your own risk. This script uses undocumented and unsupported features of AlibreScript. Be extremely careful with modifications.

    V2 released 11/18/2019 fixes incorrectly adding subtotals and makes printing for large assemblies nearly instant.
    Total_Cost_Center_V2.py had 20 downloads when it was replaced.

    V3 released 7/15/2020 adds a UtilityDialog to make including suppressed items optional. Changed print formatting.
     

    Attached Files:

    Last edited: Jul 15, 2020
    Eddy So and cadtec like this.
  2. cadtec

    cadtec Member

    Hello Nate, I am very happy about your script! Keep up the good work!
     
  3. NateLiqGrav

    NateLiqGrav Alibre Super User

    V2 released 11/18/2019 fixes incorrectly adding subtotals and makes printing for large assemblies nearly instant.
    Thanks @idslk for catching that.
    My apologies to anyone who used it. Please download the new version.
     
  4. handily1

    handily1 New Member

    Nate, How does your script get incorporated into the BOM in Alibre?
     
  5. NateLiqGrav

    NateLiqGrav Alibre Super User

    Unfortunately it is not yet. I've yet to see if such a thing is possible. However I'm working on a Assembly Matrix with guidance from Lew and that will create it's own separate spreadsheet BOM.
     
  6. cncgear

    cncgear Member

    Hi,

    Great script and I will use this extensively, but... what can be added to the script to process non-suppressed parts / assemblies only so the total cost represents what is active in the current window and ignores suppressed items?

    Also, and this is a 'nice to have' can the total cost be displayed in a pop up window?


    Many, many thanks
     
  7. NateLiqGrav

    NateLiqGrav Alibre Super User

    I will add the ability to ignore suppressed parts and subassemblies.
     
  8. idslk

    idslk Alibre Super User

    Hello Nate,

    have you thought about using a own Custom Property for the cost instead of using the StandardProperty "Cost Center"?

    Regards
    Stefan
     
  9. cncgear

    cncgear Member

    Thanks Nate, this is a really valuable tool for me.
     
  10. NateLiqGrav

    NateLiqGrav Alibre Super User

    I don't use this at all for myself.
    If someone made a request for it I might,
     
  11. NateLiqGrav

    NateLiqGrav Alibre Super User

  12. cncgear

    cncgear Member

    Nate,

    Thanks, this script runs very, very well and has eased my cost analysis somewhat. I do have one issue though, sorry to be a pain. I have attached a part for you to look at, this is an assembly, but, the cost should look at the assembly cost, not the part cost in this instance, because obviously bearings are sold as complete units, not parts thereof.

    Simply put, if an assembly has the 'Treat as BOM when used in sub assembly..." set to on, the parts should be ignored and the assembly 'cost center' data used to add the cost to the total.

    I hope that makes sense?
     

    Attached Files:

    Last edited: Jul 20, 2020
  13. DavidJ

    DavidJ Alibre Super User Staff Member

    The assembly file alone will be of no use to Nate - he'll need a package file created from the assembly. Assembly files only hold the 'rules of assembly' , not the actual constituent parts.
     
  14. Lew_Merrick

    Lew_Merrick Alibre Super User

    Hi Nate -- One of the things I have long been arguing for within File Properties->General->Part Data is a Make/Buy designation. We can (and ought to) add such a definition to the Custom Properties assignment (the first thing I did after recognizing them). Just and idea... -- Lew
     
  15. cncgear

    cncgear Member

    OK thanks, I will upload the package file.
     
    BeEdHa likes this.
  16. cncgear

    cncgear Member

    Package file
     

    Attached Files:

  17. NateLiqGrav

    NateLiqGrav Alibre Super User

    Unfortunately the "treat as part when used on BOM" is not accessible from the Alibre API. I have asked for it to be added but it hasn't happened yet. Please ask support for it to be added to the API.
     
  18. Lew_Merrick

    Lew_Merrick Alibre Super User

    +100 -- Lew
     
  19. NateLiqGrav

    NateLiqGrav Alibre Super User

    Yes this is something holding up the Project Matrix I was doing for you. The other thing is that AlibreScript (and maybe the API - I haven't dug that deep) ignore the configurations set at the assembly level.

    Say you have configurations (Small, Medium, and Large) for a part Soda_Cups and your assembly has 3 each Small, 2 each Medium, and 6 each Large. In AlibreScript I can only see that there are 11 Soda_Cups that all report their active configuration as Small (because Small was active last when the Soda_Cups part was last edited). I won't release the Project Matrix until those things are fixed.
     
  20. DavidJ

    DavidJ Alibre Super User Staff Member

    This is already with Development to add it to API.
     

Share This Page