Modify terrain profile routine

Hi, could anyone modify this routine so that instead of asking for the layer names, it asks to select them? And instead of selecting the horizontal line, it allows you to draw it.
And so that it allows you to insert the profile wherever you want, not at point 0,0.

Thank you

Comments

  • ALANH
    edited July 8

    Get layer name.

    (setq lay (cdr (assoc 8 (entget (car (entsel "\n pick object for layer "))))))

    Draw pline

    (setq plent (entlast)) ; if pline was last object drawn.