Jump to content

Leaderboard

Popular Content

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

  1. I think I got the basic idea. The only problem is I'm mostly a beginner and whenever I'm try to create any routine, I always refer to other code and not writing my own. The way I went about coding is referring to other code, looking for likely solution and modified it to suit what I need to do. I got what you mean and I do did practice it like that. However, my situation is not that I'm working a file on my own from beginning, rather that what would I do if I got that drawing from someone like I attached. When I got that drawing, making that layout into xref is just a hassle and time consuming.
    1 point
  2. For both of you here is a make table example you then use settext to add text. Sofiane the reason you could not find an answer is the majority of users user a pline outline and look inside it for all the objects then count, the most common is a "ROOM" quantity output where it uses a room number as identifier then makes the table. A side note I have a sort same blocks with attributes up to 5 attributes deep, think "Door" how many are white or black have a gold or silver handle that is 4 different for 1 block. ; make table example ; By Alan H info@alanh.com.au ; 2018 (defun c:ahmaketable (/ colwidth numcolumns numrows objtable rowheight sp vgad vgao vgms) (vl-load-com) (setq sp (vlax-3d-point (getpoint "pick a point for table"))) (Setq vgms (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)))) ; (setq numrows 5) (setq numcolumns 5) (setq rowheight 2.5) (setq colwidth 60) (setq objtable (vla-addtable vgms sp numrows numcolumns rowheight colwidth)) (vla-settext objtable 0 0 "DRAWING REGISTER"); TABLE TITLE (vla-settext objtable 1 0 "DRAWING NUMBER") (vla-settext objtable 1 1 "DRAWING TITLE") (vla-settext objtable 1 2 "C") (vla-settext objtable 1 3 "D") (vla-settext objtable 1 4 "E") (vla-settext objtable 2 0 "1") (vla-settext objtable 3 0 "2") (vla-settext objtable 4 0 "3") (command "_zoom" "e") (princ) ) Oh yes make a csv by reading table for export to excel or just read table directly fill in matching cells in excel.
    1 point
  3. There are other issues [CHECKING TEXT compare.LSP loading... SELECTION] . ; warning: local variable used as function: SS2LIST ; warning: local variable used as function: SS2LIST ; error: too few arguments in SETQ: (SETQ APP (MAPCAR ( ... ) APL) APD ... ) ; Check done. and what does it mean this 2 ** at (setq app (mapcar '(lambda (a) (trans (cdr (assoc 10 (entget a))) 0 1)) apl) apd (mapcar '(lambda (a) (distance a pth)) app) pta (nth (vl-position (apply 'min apd) apd) app) deval (mapcar '- pta pth) xp (car pta) yp (cadr pta) xb (car pth) yb (cadr pth) inpt (polar pth 0 cmp:off) blnam (cond ((and (<= xp xb) (< yp yb)) "Compare_RT") ((and (>= xp xb) (> yp yb)) "Compare_LB") ((and (< xp xb) (>= yp yb)) "Compare_RB") ((and (> xp xb) (<= yp yb)) "Compare_LT") ) ** (command "-INSERT" blnam "_S" cmp:scal inpt "0" (rtos (abs (* (car deval) 1.000)) 2 0) (rtos (abs (* (cadr deval) 1.000)) 2 0)) ) ** is a reserved funtion multiply ** (command "-INSERT" blnam "_S" cmp:scal inpt "0" (rtos (abs (* (car deval) 1.000)) 2 0) (rtos (abs (* (cadr deval) 1.000)) 2 0))
    1 point
  4. The RECTANG command is already have fillet option within so you need to specify it only once then draw the rectangle required.
    1 point
×
×
  • Create New...