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

Create a library from spreadsheet data

Discussion in 'Tutorials and Tips from the Community' started by Capitain, Mar 21, 2018.

  1. Capitain

    Capitain Member

    Hi,
    while experimenting with Alibre I needed a part library, I only had a spreadsheet with rectangular tube dimensions and part numbers and I’ve used Wizoscript (great tool, by the way) in order to auto populate the library.
    I’ve create a template part and used a script in order to modify and save it with a proper name. Of course the procedure can be adapted to other profiles, the only thing you need is a table with the dimensions.
    Since all the parts are generated from the same template I suppose this will allow a painless replacement in an assembly, if a size change is required.
    Attached are the files I’ve created, if that'd be useful.
     

    Attached Files:

    ajayre likes this.
  2. Lew_Merrick

    Lew_Merrick Alibre Super User

    Capitain -- If you check in Resouces you will find that I have a Library of all ASTM Square and Rectangular Tube sizes posted there. ???
     
  3. Capitain

    Capitain Member

    Yes, I know, but I don't use ASTM standards
     
  4. Lew_Merrick

    Lew_Merrick Alibre Super User

    Understood [and WizoScript is fantastic!).
     
  5. NateLiqGrav

    NateLiqGrav Alibre Super User

    Very cool script but I think something is wrong. Tubes are not coming out as expected. For example what looks like it should be 400x400x20 is coming out as 50x50x20
     
  6. Capitain

    Capitain Member

    Pretty funny ... I don't know what's happening on your side, I've just re-run it and it works perfectly. Have you changed something except the path?
     

    Attached Files:

  7. NateLiqGrav

    NateLiqGrav Alibre Super User

    I only changed the paths. I figured out what was wrong. Alibre is not updating everything correctly if you switch to another window and let it run in the background. See attached. The sketch is updated but the feature is NOT correct. It is fixed with a regeneration. I will report this bug to Alibre.
     

    Attached Files:

    • tube.png
      tube.png
      File size:
      218.4 KB
      Views:
      28
    Last edited: Mar 23, 2018
  8. NateLiqGrav

    NateLiqGrav Alibre Super User

    I confirmed for support this is now fixed in Alibre 2018 and AlibreScript.
     
    ajayre likes this.
  9. albie0803

    albie0803 Alibre Super User

    Here are a few scripts that I modified from Andy's website so that they insert a new part into an existing assembly. The scripts cause windows with dropdown boxes to appear where you pick the size and length you require and the part is named and inserted.
     

    Attached Files:

  10. Lew_Merrick

    Lew_Merrick Alibre Super User

    Let' say I want a "series" of Parts that are related to "values" that may be calculated within a spreadsheet. I create a matrix of said values and, in the approach I use, the first row of that matrix will be the new Part name. Each susessive row will be values to be assigned to Equation Edior values as each new Part is created. The "top" of my Script will be a series of array values covering New Part Names and Equation Editor variabgles such that they can be accessed though a single "index variable" (usually "i"). Thus I can "step through" getting and assigning new values to Equation Editor values and then SaveAs to the new Part Name.

    The biggest "hassle" is learning how to "populate" Python "array values" properly. If I wish to read directly from the spreadsheet, I organize my values in columns to simplify the "math."
     

    Attached Files:

Share This Page