selecting polylines

Discussion in 'AutoCAD' started by George Cox, Jul 19, 2004.

  1. George Cox

    George Cox Guest

    In the following code you have to select the polyline which works fine
    Is there a method of modifing the code to run if the polyline is ALREADY
    selected if not select polyline

    thank you

    (defun VL-POLY () ;get the entity and entity name
    (setq THEPL (car (entsel "\nSelect a Walk Polyline: "))
    ;convert to vl object
    THEOBJ (vlax-ename->vla-object THEPL))
    ;check if it's a polyline
    (terpri)
    (if (= (vlax-get-property THEOBJ 'OBJECTNAME) "AcDb3dPolyline")
    (progn
    (setq WALKNO (substr (vla-get-layer THEOBJ) 1 5) ; layer name
    C_TIME (menucmd
    "M=$(edtime,$(getvar,date), DD-MO-YY HH:MM:SS)")
    WALT " " ; 6 dummy spaces for altitude
    IDENT "AA"
    WALKLT (getstring "n\Enter T=Altitude Z=Zero altitude ")
     
    George Cox, Jul 19, 2004
    #1
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.