Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/21/2019 in all areas

  1. Since you are prompting for selection of multiple objects, you will likely be using the ssget function (or ActiveX equivalent) to acquire the selection. Since the ssget function already accepts keywords to determine the selection method (e.g. Window/Fence/Polygon/Group etc.), you cannot define your own keywords (as you might using initget with one of the getXXX functions) for the user to choose during the selection prompt. One alternative approach might be to allow the user to access an options menu on pressing ENTER/SPACE/right-clicking at the prompt (as opposed to dismissing the prompt via ESC), e.g.: Select objects <options>: This can be easily implemented by evaluating the ssget function using the vl-catch-all-apply function, and testing whether the value returned is a selection set (valid selection), error object (user pressed ESC), or null (user pressed ENTER/SPACE/right-click). The only other possibility that I can think of is to roll your own ssget, in which case you can configure the function to suit any purpose and offer whatever options you like.
    1 point
  2. It would probably take less than 10 seconds to recreate the missing section of the object as a solid by extruding a polyline triangle.
    1 point
  3. I think what Bigal is talking about is setting your snapang and ortho (F8) to match a group of houses then you can easily draw consistent boundaries around a bunch of lots that have the same orientation.
    1 point
  4. Your running exemain repeatedly I think to make the plines, a simpler way may be use ucs set to 1st two points then array the pline lot, switch ucs back to world. One command not repeats. Setting the ucs orientates the array to the angle.
    1 point
  5. You have to implement OVERKILL command inside LISP and then instead of using OVERKILL command you use LISP instead... Try this - it worked for me : (defun c:selremainafteroverkill ( / unique *adoc* fuzz ss el rl dl p s i e k kk f ff eel ) (vl-load-com) (defun unique ( l ) (if l (cons (car l) (unique (vl-remove (car l) l))) ) ) (setq *adoc* (vla-get-activedocument (vlax-get-acad-object))) (if (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark *adoc*) ) (vla-startundomark *adoc*) (initget 6) (setq fuzz (getreal "\nFuzz factor for OVERKILL <1e-4> : ")) (if (null fuzz) (setq fuzz 1e-4)) (setq sss (ssadd)) (setq ss (ssget "_A" (list (cons 410 (if (= 1 (getvar 'cvport)) (getvar 'ctab) "Model"))))) (if ss (progn (setq el (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) (ssget "_:L") (vl-cmdf "_.-overkill" "_p" "" "_o" fuzz "_i" "_a" "_p" "_y" "") (foreach ee el (if (entget ee) (setq rl (cons ee rl)) (setq dl (cons ee dl)) ) ) (vl-cmdf "_.undo" "1") (setq k 0 kk 0) (foreach ee dl (if (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getstartpoint (list ee)))) (progn (setq p (vlax-curve-getpointatparam ee (/ (+ (vlax-curve-getstartparam ee) (vlax-curve-getendparam ee)) 2.0))) (setq p (trans p 0 1)) (setq s (ssget "_C" p p)) (if s (progn (repeat (setq i (sslength s)) (if (vl-position (setq e (ssname s (setq i (1- i)))) rl) (ssadd e sss) ) ) ) (progn (setq k (1+ k)) (setq f t) ) ) ) (progn (setq eel (cons (vl-remove-if '(lambda ( x ) (vl-position (car x) '(-1 5 6 8 39 43 62 347 370 380 390 420 430 440))) (entget ee)) eel)) (setq kk (1+ kk)) (setq ff t) ) ) (entdel ee) ) ) ) (foreach ee rl (if (vl-member-if '(lambda ( x ) (equal (vl-remove-if '(lambda ( y ) (vl-position (car y) '(-1 5 6 8 39 43 62 347 370 380 390 420 430 440))) (entget ee)) x 1e-6)) eel) (ssadd ee sss) ) ) (if (/= (sslength sss) 0) (progn (prompt "\nEntities that haven't been erased by OVERKILL are highlighted - there are : ") (princ (sslength sss)) (prompt " entities in remaining sel.set... Selection set is stored in \"sss\" variable...") (sssetfirst nil sss) ) (setq sss nil) ) (if f (progn (prompt "\nSome entities that are OVERKILLED are curves but placed out of visible screen during operation, so those remaining overlap entities couldn't be highlighted... Total OVERKILLED of these curves : ") (princ k) ) ) (if ff (progn (prompt "\nSome entities that are OVERKILLED don't belong to curves... Those entities belong to : ") (prin1 (unique eel)) (prompt " entity types... Total OVERKILLED these entity types : ") (princ kk) ) ) (vla-endundomark *adoc*) (princ) ) HTH., M.R.
    1 point
×
×
  • Create New...