Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/06/2023 in all areas

  1. ok will look into it and feedback later.. The door panel is under Glass Material As you can see in the screenshot, I selected the Door Panel, and in the properties the RED circle is linked to a Parameter named Panel Material. The material set for this parameter is Glass (encircled in Yellow) So you may want to change this material. I have also found another door but there is a middle rail that I will like to remove that will give the exact same result. Regarding this, I noticed that you are using 2019 Version. I am using 2021 version currently. Revit doesn't allow backward compatibility meaning if I save this door family in 2021 version, you cannot open that anymore in 2019 version As
    2 points
  2. Just putting this up here as something I wanted for a while and had 10 minutes to think last night. I'd been wanting a routine "Select an entity or enter a value". Been doing it with initget which gives discrete values and not every possibility. So made up the following. All good so far, haven't found out where it is broken yet. Just to get your brains working then, trying to figure out how to change the mouse pointer as it hovers over an entity and not select it? Using grread and it's options you either get mouse pointer change and it selects automatically or no mouse pointer change and select with a mouse click as far as I can see. Any ideas? Thanks (defun c:EntOrValue ( / msg MyResult) (setq msg "\nSelect an Entity or enter a value: \n") (setq MyResult (EntorValue msg) ) ; end defun ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun EntorValue ( MSG / EndLoop sel MyEnt MyValue enta entb pt) (setq MyValue "") (setq MyEnt (list)) (setq EndLoop "No") (princ MSG) (while (= EndLoop "No") ; start loop (setq sel (nth 1 (grread nil 0 2))) ; read keyboard / mouse inputs. Ignore mouse position, only if clicked (if (= (type sel) 'LIST) (progn ; if sel is a LIST,... ie. a mouse click, a point returned (setq MyEnt (nentselp sel)) ; select entity from point (if (= nil MyEnt) (Princ "\nMissed! Try again. Select text or enter a value: ") ; entity not selected (setq EndLoop "Yes") ; entity selected, end while loop ) ; end if ) ; end progn (progn ; if sel is not a LIST, i.e. a single keyboard entry (if (or (and (> sel 47)(< sel 57))(= sel 46)) ; numbers only (progn (princ (chr sel)) (setq MyValue (strcat MyValue (chr sel) )) ) ) (if (= sel 45) ; -ve ; make negative number (progn (setq MyValue (strcat (chr sel) MyValue )) (princ " Making -ve\n")(princ MyValue) ) ; end progn ) ; end if (if (= sel 13) ; enter - end number input, end loop (progn (setq EndLoop "Yes") ) ; end progn ) ; end if ) ; end progn ) ; end if list ) ; end while (if ( = (length MyEnt) 0) ; if entity not selected (progn MyValue ; return number entered ) ; end progn (progn ;;GetEnt code (setq enta (car MyEnt)) (setq pt (cdr (assoc 10 (entget enta))) ) ;;fix for nenset or entsel requirements (setq entb (last (last (nentselp pt)))) ;; use sel? (if (and (/= entb nil) (/= (type entb) 'real) ) (progn (if (wcmatch (cdr (assoc 0 (entget entb))) "ACAD_TABLE,*DIMENSION,*LEADER")(setq enta entb)) ) ) (setq MyEnt enta) MyEnt ; return entity name, including nested say text from dimensions ) ; end progn ) ; end if )
    1 point
  3. This old example may provide some food for thought
    1 point
  4. Just use : (read (rtos 4776.5765 2 0))
    1 point
  5. Cheers Steve, that works great! Thanks for the quick response as well!
    1 point
  6. Please use the <> to place your code in Code Tags. I fixed this one for you.
    1 point
  7. I will look into the original code more thought it was correct use trans to convert the corners to world. Read my comments about some of the legends being inserted.
    1 point
  8. Here's another way to write it - (defun casesensitivity ( s ) (vl-list->string (apply 'append (mapcar '(lambda ( a b ) (if (= a b) (list a) (list 91 a b 93))) (vl-string->list (strcase s)) (vl-string->list (strcase s t)) ) ) ) ) As for combinations, maybe something like this - (defun combinations ( s / foo ) (defun foo ( u l ) (if (cdr u) (append (mapcar '(lambda ( x ) (cons (car u) x)) (foo (cdr u) (cdr l))) (mapcar '(lambda ( x ) (cons (car l) x)) (foo (cdr u) (cdr l))) ) (list u l) ) ) (mapcar 'vl-list->string (foo (vl-string->list (strcase s)) (vl-string->list (strcase s t)) ) ) ) _$ (length (combinations "floor")) 32
    1 point
×
×
  • Create New...