Help

Discussion in 'AutoCAD' started by sashk, Jul 9, 2004.

  1. sashk

    sashk Guest

    I use a layer stacking method. This is done with prefixes.

    I am starting a lisp routine (wish me luck on this one) in which it asks you to pick a view port. Once it is picked, it will start a VPLAYER command so that I can pick which layers to freeze. I use pop-ups so that people can pick which layers they want, to, say turn off by the use of a *p0=whatever P0=* (macros) now, in a lisp routine, while the command is active, how can I make it so that it will pop up a box from my menu file

    ex: (command "vplayer" "f" <pop up box and wait for user to select what they want to freeze>

    The <> is my problem. Any ideas?
     
    sashk, Jul 9, 2004
    #1
  2. sashk

    ECCAD Guest

    I would try a dialog box. Use a 'list_box', and charge up the list with a 'layer' list.

    Bob
     
    ECCAD, Jul 10, 2004
    #2
  3. Here is a viewport freeze program I use that allows the user to pick
    entities.
    ;LFVP = viewport freeze layers for user selected XREF entities
    (defun C:LFVP (/ LL FL ES EG ET EB EN LN YN)
    (setq LL "" FL 0)
    (C:MS)
    (setq ES (nentsel "\nSelect XREF Entity to FREEZE Layer in ViewPort ? "))
    (while ES
    (setq EG (entget (car ES)))
    (setq ET (cdr (assoc 0 EG)))
    (if (and (car (cadddr ES)) (= (cdr (assoc 0 (entget (car (cadddr ES)))))
    "INSERT"))
    (setq EB (entget (car (cadddr ES))))
    (setq EB nil)
    )
    (if (member ET (list "VERTEX" "ATTRIB"))
    (progn
    (setq EN (entget (entnext (cdr (assoc -1 EG)))))
    (while (/= (cdr (assoc 0 EN)) "SEQEND")
    (setq EN (entget (entnext (cdr (assoc -1 EN)))))
    )
    (setq EG EN)
    )
    )
    (setq LN (cdr (assoc 8 EG)))
    (setq YN (strcase (getstring (strcat "\nFreeze Layer [" LN "] - [n]=No
    or [Y]=Yes ? "))))
    (if (member YN (list "Y" ""))
    (if (= FL 0)
    (setq LL LN FL 1)
    (setq LL (strcat LL "," LN))
    )
    )
    (setq ES (nentsel "\nSelect Another XREF Entity to FREEZE Layer in
    ViewPort or [ENTER]=Finished Selecting ? "))
    )
    (if (/= LL "")
    (progn
    (command "PSPACE")
    (setq ES (entsel "\nSelect View Port to FREEZE entities ? "))
    (if ES
    (command "_VPLAYER" "F" LL "S" (car ES) "" "")
    (princ "\nNOTICE - NO VPLAYER command issued. You must Select a
    ViewPort....")
    )
    )
    )
    (princ)
    )
     
    Alan Henderson @ A'cad Solutions, Jul 11, 2004
    #3
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.