UCS Direction problem.

Discussion in 'AutoCAD' started by BillZ, Jul 15, 2003.

  1. BillZ

    BillZ Guest

    R14 Autolisp:
    I have a program that inserts a block at the vertext of a polyline. It uses the first point and the second point of a 3D pline with spline fit to set the ucs to Zaxis, then inserts the block and goes to the next point, sets the ZA and inserts the block and so on until the end of the pline. The blocks stay mostly "in line" but in a couple of places the ucs turns oddly at somewhere around 180d. which upsets what I'm doing with the program. Is there some "direction" to vertex points? I'm only using the assoc 70 with values of 40, vertexes (3d vertexes with spline fit), not the control points to insert. Be nice if I could find some way to keep the blocks "in line" on the pline.
    (please don't mention the measure command as this is not what I'm looking for.)

    TIA

    Bill
     
    BillZ, Jul 15, 2003
    #1
  2. BillZ

    Devin Guest

    Why not just use the measure command :) just kidding, there's got to be a solution though, I've yet to find a problem that has no solution.



     



    Devin
     
    Devin, Jul 15, 2003
    #2
  3. BillZ

    BillZ Guest

    This seems to work:
    Instead of ... (command "ucs" "za" lc1 c2 );sets ucs z axis to polyline segment.

    .... This seems to keep all inserts on the same "track".
       (command "ucs" "3" lc1 pt_ucs lc2)
       (command "ucs" "X" -90) ;sets the ucs to each segment.
    Had to create pt_ucs 90d from angle of lc1 lc2.

    Bill
     
    BillZ, Jul 16, 2003
    #3
  4. BillZ

    Devin Guest

    Looks familiar as I just used the same process for ucs in a program I'm using, only instead of 90d I had to adjust to 180d and flip the ucs over.



     



    Devin
     
    Devin, Jul 16, 2003
    #4
  5. BillZ

    Devin Guest

    I just wish there was a way to bypass the command "UCS" and use vla- functions instead.  It would make my command much faster.  I'll keep working on it for my own needs.



     



    Devin
     
    Devin, Jul 16, 2003
    #5
  6. BillZ

    Devin Guest

    I'm still pretty new at this vla stuff.  I'm in A2K.  A UCS is an object in a UCS's collection.  Eventually I'll program a three point function to set the ucs then adjust for rotations along the axis'.  That would be super cool for some of the stuff I'm doing.



     



    Devin
     
    Devin, Jul 16, 2003
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.