Insert line

Discussion in 'AutoCAD' started by dveusa, Apr 6, 2006.

  1. dveusa

    dveusa Guest

    I have asked this question a couple of times before but I did get
    nowhere.
    Maybe I am too stupid or too old or both. Or I did not properly
    describe the problem .
    Here is my problem:

    I want to insert lines in a drawing "start snap - end snap".
    I wand to be able to trim, stretch champher etc those lines as normal
    lines.
    So far no problem.

    At the end of the ride I want to extract the length of each line with
    the attiribute extraction feature.

    I have tried with blocks (the block is a line of 1 unit long). I can
    insert - rotate - stretch etc and extract the length but I can not
    modify (stretch, trim, join, chamfer...) these lines ones they have
    been inserted.

    I am using Acad 2006 Mechanical. An average drawing contains about 100
    - 200 different blocks and maybe 80 - 100 lines as per above
    description.

    Thanks,
    Daniel
     
    dveusa, Apr 6, 2006
    #1
  2. If it has to have an attribute, it has to be a block. You cannot do as you
    say to a block but you can rescale a block until it's length is whatever you
    need it to be. The result should be the same as if you had edited line,
    although the work required may be greater. That's the price you pay for
    working with blocks.

    You may need some 'constructive geometry' to do this accurately. After
    rescaling the block you'll probably want a function to update the length
    attribute.

    At this end, we end up having to accept your assumptions about the efficacy
    of working this way, I'm afraid.
     
    Michael Bulatovich, Apr 6, 2006
    #2
  3. dveusa

    dveusa Guest

    ................
    just use lines ( and arcs if you have rounded corners ) and use the
    ssget function to sum their lengths at the end of your ride. is this
    accumlation what you are after?
    .......................

    Exactly. I am not very familiar with AutoLisp but I tried (setq
    ss(ssget)).... and than (sslength ss).... This returned the number of
    lines not the length in that part of the drawing.
    If I just could get the total length than this would save my day.
    Thank you for helping me out... maybe I am not too old after all.

    Daniel.
     
    dveusa, Apr 7, 2006
    #3
  4. Paul Turvill has a lisp to give the total length of selected lines on his
    website.
     
    Michael Bulatovich, Apr 7, 2006
    #4
  5. dveusa

    dveusa Guest

    Thanks a lot. I found exactly what I needed.
     
    dveusa, Apr 9, 2006
    #5
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.