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

Using data from a .CSV file

Discussion in 'Using Alibre Design' started by bpimm, Jan 18, 2013.

  1. bpimm

    bpimm Member

    I'm helping my brother on this project, The goal is to import X Y coordinates from a CSV file to create a curve to make a template from. this is a 2D project just a simple 5mm plywood cutout. I suggested Alibre to plot the curve and get a scaled drawing from. He and I both have PE, I have used it a fair amount but He has barely started using Alibre. He figured out how to import the CSV into a 3D sketch but couldn't get it to do anything. I looked at his file and it didn't work for me either so I recreated it from scratch only to find the same thing. The curve imports fine, I then closed the sketch to the axis so it could be mirrored to form the other side of the template. Apparently mirror doesn't work in 3D sketch so I was going to extrude the half then mirror the extrusion but when I select extrude boss it deselects the sketch and won't let me select it. I haven't used 3D sketches much so I'm not familiar with them, does extrude boss work in 3D sketches?

    Is there a way to import the csv strait into a 2D sketch as we don't need the functionality of 3D for this project. We just want to import the curve, mirror it, then connect the ends and print a scale drawing.

    Any help would be appreciated.
    Brian

    P.S. I attached the part but i can't seem to get it to attach the .csv file.
     

    Attached Files:

  2. Ralf

    Ralf Alibre Super User

    Hi Brian,

    You mean something like this?
    .
     

    Attached Files:

  3. bpimm

    bpimm Member

    exactly, what was I doing wrong?
     
  4. Ralf

    Ralf Alibre Super User

    Brian, my English skills are limited, :oops:
    but if you want you can take a look in my example.
    Download -> Save - Open with AD V2012.
    .
     

    Attached Files:

  5. Lew_Merrick

    Lew_Merrick Alibre Super User

    Brian,

    One of the problems here is that the CSV format for importing into the Equation Editor is poorly documented. I have been working on this, but have not completed my research yet. What I think I know is that the (if you will) variable line input format looks something like this:

    ID, Equation, Assigned Value, Interpret as Distance or Angle, Unavailable, Unavailable

    Where "ID" is the variable's identifier, "Equation" is the equation constructed of other "ID-variables," "Assigned Value" is the actual numeric value assigned to the variable, "Interpret as Distance or Angle" is (literally) a "Distance" or "Angle" input, and I assume that the remaining (2) "Unavailable" are spaces held for future application.

    Thus, if you were putting point values in for use through the Equation Editor, you would break them down into something like: a_P1-X and a_P1-Y values in a list something like:

    a_P1-X,Unavailable,(numeric X-value for point 1),Distance,Unavailable,Unavailable
    a_P1-Y,Unavailable,(numeric Y-value for point 1),Distance,Unavailable,Unavailable
    a_P2-X,Unavailable,(numeric X-value for point 2),Distance,Unavailable,Unavailable
    a_P2-Y,Unavailable,(numeric Y-value for point 2),Distance,Unavailable,Unavailable
    ...
    a_Pn-X,Unavailable,(numeric X-value for point n),Distance,Unavailable,Unavailable
    a_Pn-Y,Unavailable,(numeric Y-value for point n),Distance,Unavailable,Unavailable

    Remember that the numeric values should include the unit identifier (", ft, mm, cm, or m) for the distance to prevent misinterpretation. Prefixing the a_ to the beginning of the "ID" insures that your values stay at the top of the list in the Equation Editor so you spend less time searching for them. You use the Import function within the Equation Editor to load your CSV file.

    In your sketch, you place an appropriate number of point entities. When you dimension them, then the a_Pn-X values get assigned to the x-coordinate dimensions of your points and the a_Pn-Y values get assigned to the y-coordinate values of your points using the f(x) assignment. When you place your geometry, place it with knots (the defining point set for the curve) close to the pre-defined points such that you can use the Coincident Constraint to assure that each knot is associated with a specific point.

    The only way to import such data directly is to use Alex Franke's Point Import Wizard for Alibre Design. This is a good little utility (and not all that expensive). However, it is still a work-around for the (shall we say) oversight of ignoring the need to accurately, quickly, and easily import geometry point sets into Alibre.
     
  6. bpimm

    bpimm Member

    Ralf your English skills are nowhere as limited as my German skills. :) I think I can count to 3...

    I tried to open your example and got this error:

    at com.alibre.engineering.server.EngineeringSession.handleException(Exception exception)
    at com.alibre.design.server.DesignSession.initializeRepositoryWorkspace(RepositoryVersionReference version, SerializedWorkspace workspace)
    at com.alibre.design.server.DesignSessionFactory.newRepositorySession(UserContext userContext, RepositoryVersionReference version, ISerializedWorkspace workspace, IEngineeringSession parentSession, IBusyBodyContextObject busyBodyKey)
    at com.alibre.app.ClientShell.OpenDesignWorkspace.onRun()
    at com.alibre.app.ClientShell.ThreadWorker.Run()

    I have no idea what any of this means.
    Brian
     
  7. Ralf

    Ralf Alibre Super User

    Hi Brian,

    Please download again, I have changed the file.
    (I have used suppressed features in the first.)
     
  8. bpimm

    bpimm Member

    Hi Lew,

    I'll have to study this information a while and see if I can wrap my head around it.

    The points seemed to import correctly, I just couldn't work with the sketch. Ralf made it work just the way I wanted, I just can't open his file.. :lol: This shouldn't be this difficult...

    We didn't use the equation editor to load the data we used: 3d sketch; figures; Insert from file. I just tried the equation editor and got an "Invalad CSV file" error so I'm assuming that if I put the data into your format then it may work in 2D sketches. Has anybody wrote a script to take a standard csv and rewrite into your suggested format?

    Thanks
    Brian

     
  9. bpimm

    bpimm Member

    Tried again, same results.
     
  10. Ralf

    Ralf Alibre Super User

    Brian, my Alibre Part was created with AD V 2012.
    You are still on AD V2011 ( V13056 ), therefore you cannot open my AD V 2012 - Part/file.
     
  11. Ralf

    Ralf Alibre Super User

    Here is a STEP AP 203 file.
    Please download -> Save -> Import...
    .
     

    Attached Files:

  12. bpimm

    bpimm Member

    That explains that... :(
     
  13. bpimm

    bpimm Member

    Ralf thanks for all the help. unfortunately PE can't import step. I may know someone that has 2011 still that can convert it to a part for me but I still am in need of the procedure to make this work. this is just the start of the project and it will probably have many updates through it's life.

    Thanks again
    Brian
     
  14. Lew_Merrick

    Lew_Merrick Alibre Super User

    The thing to remember is that you are Importing the data into the Equation Editor (<Ctrl>E is the default hotkey) and then using it to control dimensions in your sketch.

    I am still "decoding" the Equation Editor CSV format. The documentation in the User's Guide falls quite short here. To say that a fully functional macro language would be a great help is a major understatement...
     
  15. bpimm

    bpimm Member

    Hi Lew,

    My brother downloaded the import tool you mentioned and we have a working copy, I think... I walked him through making a drawing and he is going to try to print a template, Fingers crossed. If it turns out to do what we need we'll buy that and hopefully Alibre will get better in the long run.

    Thanks for the help,
    Brian

    P.S. "the soviet of Washington" is that Washington state or DC? I'm in Washington State also known as the peoples republic of Washington.
     
  16. Ralf

    Ralf Alibre Super User

    Hi Brian,
    Yes, there is a way with AD V2011, please take a look:

    Alibre Points 3D and 2D Splines - Lines - Points
    viewtopic.php?f=7&t=10730&start=0&st=0&sk=t&sd=a
    Download: Alibre Points - TXT (C)2009 Renner.zip

    1-> Start Alibre
    2 -> Start Alibre Points
    3 -> Open a new part
    4 -> Choose the session -> New Part (x)
    5 -> Check 2D
    6 -> Check -> Spline + PTS
    7 -> Check -> Close Spline
    8 -> Press the " Import .txt " Button
    9 -> Choose a *.txt file ( ; separated )
    10 -> Press =>

    A short video clip
     
  17. Lew_Merrick

    Lew_Merrick Alibre Super User

    Washington State was run by the Socialist Party from (about) 1917-1935. My grandfather was a Washington State Supreme Court justice elected on the Socialist Party ticket from 1927-1942. It was not uncommon for people to say, "There are the 47 States and the Soviet of Washington." when I was a kid.

    One of my grandfather's good friends was Gus Hall, the head of the American Communist Party. There used to be a question on all security questionnaire, "Do you know any communists?" I always had fun being able to answer, "Yes, Gus Hall. Will he do?" And, I like to add that I only made the mistake of trying to stay up with Gus drinking whiskey only once...
     
  18. Oldbelt

    Oldbelt Senior Member

    Dear friends.
    It's a little bit frustrating to follow how this simpel part can bring you out of a lot of tangents,
    instead of keep it simpel down to earth and help the newbe who is asking for help.

    It's a simpel 2D kurve, mirror, extrude, extrude cut.
     

    Attached Files:

  19. Ralf

    Ralf Alibre Super User

    Hi Bent,

    Brian is working with AD V2011 (V13) and NOT with AD V2012 (V 14) as you can see:
    Your file Half-Petal-Simpel(1).AD_PRT was also created with AD V2012 (V14) and Brian can not open your file with AD V2011 (V13).
     
  20. khoaxnam

    khoaxnam Member

    @Oldbert: This is completely irrelevant to the topic of this thread, but I really want to know how did you export the data into a word pad. I feel like there is a feature for that, and I don`t know about it.
     

Share This Page