hosneyalaa Posted February 5, 2019 Posted February 5, 2019 (edited) Sorry English is not good Hello all I have 2 LWPOLYLINES RED LWPOLYLINE GREEN LWPOLYLINE When working, the table does not work as shown on the panel The message appears error: ActiveX Server returned an error: Parameter not optional I ask you for help (defun c:POP ( / A acDataRow acHeaderRow acMiddleCenter acTitleRow B pts C COLWIDTH CURSPACE D2 DIS DOC E EL I II LEV LEVI LW N NN NUMCOLUMNS NUMROWS OBJTABLE OUT OUT_P P PL PLL PT1 PTCNTR PTLST PTS ROWHEIGHT S SLIST SSN X1 XY Y Y1 YI Z DIST HH INC LW OUT1 P XY1) (setq el (CAR(entsel "Select a RED LWPOLYLINE : "))) (setq lw (CAR(entsel "Select a GREEN LWPOLYLINE : "))) (setq lev (* 10 27)) (setq inc (getdist "\nSet the increment distance here : ")) (SETQ ht (GETREAL "\n-> Enter text height : ")) (INITGET 7) (COMMAND "PDMODE" 35) (COMMAND "PDSIZE" HT) ;;;(SETQ pt1 (VLAX-3D-POINT (GETPOINT "\n-> Pick point for top left hand of table: "))) (setq i 0) (repeat (- (fix (vlax-curve-getendparam el)) 1);RED ;;; (setq d1 (vlax-curve-getdistatparam el i)) (setq d2 (vlax-curve-getdistatparam el (1+ i))) (setq pl (cons(vlax-curve-getpointatdist lw d2) pl));RED (setq i (1+ i)) );REPEAT ;;; (PRINC pl) (setq pll (mapcar '(lambda ( p ) (trans (list (car p) (cadr p) (cdr (assoc 38 (entget lw)))) lw 0)) (mapcar 'cdr (vl-remove-if '(lambda ( x ) (/= (car x) 10)) (entget lw))))) (setq pll (append pl pll)) (setq ptLst(vl-sort pll '(lambda(a b)(<(car a)(car b))))) (setq x1(car(car ptLst))) (setq y1(cadr(car ptLst))) (setq ii 0) (repeat (length ptLst) (setq dis (- (car(nth ii ptLst)) x1)) (setq yi (- (cadr(nth ii ptLst)) y1)) (setq levi(/ (+ lev yi) 10)) (setq xy(vlax-curve-getpointatdist el dis)) (setq out(LIST (CAR xy) (CADR xy) levi)) (setq out_p(cons out out_p)) (setq ii (1+ ii)) ) (setq out_pp(reverse out_p)) ;;; (PRINC xy) (entmake (list '(0 . "POLYLINE") '(100 . "AcDbEntity") '(100 . "AcDb3dPolyline") '(66 . 1) '(62 . 1) '(10 0.0 0.0 0.0) '(70 . '(210 0.0 0.0 1.0) ) ) (foreach pt out_pp (entmake (list '(0 . "VERTEX") '(100 . "AcDbEntity") '(100 . "AcDbVertex") '(100 . "AcDb3dPolylineVertex") (cons 10 pt) '(70 . 32) ) ) ) (entmake (list '(0 . "SEQEND") '(100 . "AcDbEntity") ) ) (command "._Change" (entlast) "" "p" "color" "120" "") ;;;;;;;;;;;;;;;;;;;;;;;;; (SETQ n 0) (setq dist 0) (while (setq xy1 (vlax-Curve-GetPointAtDist el dist)) (setq HH(vlax-curve-getpointatdist lw dist)) (setq yi (- (cadr HH) y1)) (setq levi(/ (+ lev yi) 10)) (setq out1(LIST (CAR xy1) (CADR xy1) levi)) ;;add the point to a list (SETQ pts (CONS (list (ITOA(SETQ n (1+ n))) (car out1)(cadr out1)(cadDr out1)) pts)) ;;; (setq pts(cons out1 pts)) ;;increment the distance for the next point (setq dist (+ dist inc)) (COMMAND "_.TEXT" out1 ht "0" (ITOA n)) (COMMAND "_.POINT" out1 "") );while (if (/= dist dis) (progn (SETQ pts (CONS (list (ITOA(SETQ n (1+ n))) (car out)(cadr out)(cadDr out)) pts)) (COMMAND "_.TEXT" out ht "0" (ITOA n)) (COMMAND "_.POINT" out "") ;;; (setq pts(cons out pts)) )) (setq ptss(reverse pts)) ;;; (setvar 'osmode 0) (setq pAt (getpoint"\nPick table insertion point:")) (lstToTable pAt "COORDINATES" ptss) (princ) (vl-load-com) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun lstToTable (insPt ; List Insertion point of Table title ; String Table Title cmLst ; List of sublists of Values in Rows / accol ;AutoCAD.AcCmColor object col ; Integer Column Item rows ; Integer Number of Rows cols ; Integer Number of Columns row ; Integer Row Item sbLst ; List of Values in a Row atable ; Table Object strg ; String Item in List ) (if (not insPt) (setq insPt (getpoint "\nSelect Insertion Point: "))) (setq rows (1+ (length cmLst)) cols (apply 'max (mapcar 'length cmLst)) atable (vla_addTable insPt rows cols) ) ; to prevent display table changes at runtime: (vla-put-regeneratetablesuppressed atable :vlax-true);supres opening and closing table-block object at each writting to table (setq accol (vla-get-truecolor atable)) (vla-setrgb accol 16 37 66) (vla-put-truecolor atable accol) ;************************************************************************************ ; Populate Title and set title (vla-settext atable 0 0 title) (vla-setrgb accol 255 161 66) (vla-setcellcontentcolor atable 0 0 accol) ;(vla-setrgb accol 0 64 255) (vla-setrgb accol 20 27 105) (vla-SetCellBackgroundColor atable 0 0 accol) (vla-setrgb accol 82 0 0) ;************************************************************************************ ; Populate Column Headers and Data Rows (setq row 1 col 0 ) (foreach sbLst cmLst (foreach strg sbLst (vla-settext atable row col strg) (vla-setcellalignment atable row col acMiddleCenter) (vla-setrgb accol 82 0 0) (vla-setcellcontentcolor atable row col accol) (if (> col 0)(progn (vla-setcelldatatype atable row col acdouble acUnitDistance) (vla-setcellformat atable row col "%lu2%pr2"))) (vla-setrgb accol 255 245 235) (vla-SetCellBackgroundColor atable row col accol) (setq col (1+ col)) ) (setq col 0 row (1+ row))) (vla-insertrows atable 1 (* txtsize 1.5) 1) (setq col 0 row 1) (foreach strg (list "PT." "X" "Y" "Z") (vla-settext atable row col strg) (vla-setcellalignment atable row col acMiddleCenter) (vla-setrgb accol 82 0 0) (vla-setcellcontentcolor atable row col accol) (vla-setrgb accol 249 198 182) (vla-SetCellBackgroundColor atable row col accol) (setq col (1+ col))) (vla-setcolumnwidth atable 0 (* (getvar 'textsize) ) (vla-setrowheight atable 1 (* (getvar 'textsize) 1.5)) ;(vla-recomputetableblock atable :vlax-true) ;on the end display table object changes: Every instance of vla-settext ; opens table-block object, writes and closes them.Works pretty slow! (vla-put-regeneratetablesuppressed atable :vlax-false) (vlax-release-object atable) ;release memory used to create this object (vlax-release-object accol) )) ; The Create Table Function Accepts 3 Arguments including the ; Insertion point of the table, the Number of Rows and Number of Columns. (defun vla_addTable (insPt ; Insertion Point of Table rows ; Integer Number of Rows in Table cols ; Integer Number of Columns in Table / atable ; Table Object ) (setq txtsize (getvar 'textsize);|(variant-value (vla-getvariable (vla-get-activedocument (vlax-get-acad-object)) "textsize"))|;;commented atable (vla-addtable (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)))) (vlax-3d-point insPt) rows cols (* txtsize 1.25) (* txtsize 2))) atable ) TEST -2.dwg test final-FORUM.LSP Edited February 5, 2019 by hosneyalaa Quote
rlx Posted February 5, 2019 Posted February 5, 2019 you may also learn to use the debug function in the lisp editor 1 don't localize acDataRow acHeaderRow acMiddleCenter acTitleRow (autocad constants) 2 vla_addTable -> vla-addTable (line 154) 3 add table must include document space (Mspace in this case) 4 setcolumn width in line 209 was wrong 5 because of that you released you table object to early (defun c:POP (/ A B pts C COLWIDTH CURSPACE D2 DIS DOC E EL I II LEV LEVI LW N NN NUMCOLUMNS NUMROWS OBJTABLE OUT OUT_P P PL PLL PT1 PTCNTR PTLST PTS ROWHEIGHT S SLIST SSN X1 XY Y Y1 YI Z DIST HH INC LW OUT1 P XY1) (setq el (CAR (entsel "Select a RED LWPOLYLINE : "))) (setq lw (CAR (entsel "Select a GREEN LWPOLYLINE : "))) (setq lev (* 10 27)) (setq inc (getdist "\nSet the increment distance here : ")) (SETQ ht (GETREAL "\n-> Enter text height : ")) (INITGET 7) (COMMAND "PDMODE" 35) (COMMAND "PDSIZE" HT) ;;;(SETQ pt1 (VLAX-3D-POINT (GETPOINT "\n-> Pick point for top left hand of table: "))) (setq i 0) (repeat (- (fix (vlax-curve-getendparam el)) 1) ;RED ;;; (setq d1 (vlax-curve-getdistatparam el i)) (setq d2 (vlax-curve-getdistatparam el (1+ i))) (setq pl (cons (vlax-curve-getpointatdist lw d2) pl)) ;RED (setq i (1+ i)) ) ;REPEAT ;;; (PRINC pl) (setq pll (mapcar '(lambda (p) (trans (list (car p) (cadr p) (cdr (assoc 38 (entget lw)))) lw 0)) (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget lw))))) (setq pll (append pl pll)) (setq ptLst (vl-sort pll '(lambda (a b) (< (car a) (car b))))) (setq x1 (car (car ptLst))) (setq y1 (cadr (car ptLst))) (setq ii 0) (repeat (length ptLst) (setq dis (- (car (nth ii ptLst)) x1)) (setq yi (- (cadr (nth ii ptLst)) y1)) (setq levi (/ (+ lev yi) 10)) (setq xy (vlax-curve-getpointatdist el dis)) (setq out (LIST (CAR xy) (CADR xy) levi)) (setq out_p (cons out out_p)) (setq ii (1+ ii)) ) (setq out_pp (reverse out_p)) ;;; (PRINC xy) (entmake (list '(0 . "POLYLINE") '(100 . "AcDbEntity") '(100 . "AcDb3dPolyline") '(66 . 1) '(62 . 1) '(10 0.0 0.0 0.0) '(70 . 8) '(210 0.0 0.0 1.0)) ) (foreach pt out_pp (entmake (list '(0 . "VERTEX") '(100 . "AcDbEntity") '(100 . "AcDbVertex") '(100 . "AcDb3dPolylineVertex") (cons 10 pt) '(70 . 32) ) ) ) (entmake (list '(0 . "SEQEND") '(100 . "AcDbEntity") ) ) (command "._Change" (entlast) "" "p" "color" "120" "") ;;;;;;;;;;;;;;;;;;;;;;;;; (SETQ n 0) (setq dist 0) (while (setq xy1 (vlax-Curve-GetPointAtDist el dist)) (setq HH (vlax-curve-getpointatdist lw dist)) (setq yi (- (cadr HH) y1)) (setq levi (/ (+ lev yi) 10)) (setq out1 (LIST (CAR xy1) (CADR xy1) levi)) ;;add the point to a list (SETQ pts (CONS (list (ITOA (SETQ n (1+ n))) (car out1) (cadr out1) (cadDr out1)) pts)) ;;; (setq pts(cons out1 pts)) ;;increment the distance for the next point (setq dist (+ dist inc)) (COMMAND "_.TEXT" out1 ht "0" (ITOA n)) (COMMAND "_.POINT" out1 "") ) ;while (if (/= dist dis) (progn (SETQ pts (CONS (list (ITOA (SETQ n (1+ n))) (car out) (cadr out) (cadDr out)) pts)) (COMMAND "_.TEXT" out ht "0" (ITOA n)) (COMMAND "_.POINT" out "") ;;; (setq pts(cons out pts)) )) (setq ptss (reverse pts)) ;;; (setvar 'osmode 0) (setq pAt (getpoint "\nPick table insertion point:")) (lstToTable pAt "COORDINATES" ptss) (princ) (vl-load-com) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun lstToTable (insPt ; List Insertion point of Table title ; String Table Title cmLst ; List of sublists of Values in Rows / accol ;AutoCAD.AcCmColor object col ; Integer Column Item rows ; Integer Number of Rows cols ; Integer Number of Columns row ; Integer Row Item sbLst ; List of Values in a Row atable ; Table Object strg ; String Item in List ActiveDocument mSpace ) (if (not insPt) (setq insPt (getpoint "\nSelect Insertion Point: "))) (setq ActiveDocument (vla-get-activedocument (vlax-get-acad-object))) (setq mSpace(vla-get-modelspace ActiveDocument)) (setq rows (1+ (length cmLst)) cols (apply 'max (mapcar 'length cmLst)) ;;; * * * edit vla_addTable : underscore is wrong , added mspace, point format wrong , row height / width missing atable (vla-addTable mSpace (vlax-3D-point insPt) rows cols 5 10) ) ; to prevent display table changes at runtime: (vla-put-regeneratetablesuppressed atable :vlax-true) ;supres opening and closing table-block object at each writting to table (setq accol (vla-get-truecolor atable)) (vla-setrgb accol 16 37 66) (vla-put-truecolor atable accol) ;************************************************************************************ ; Populate Title and set title (vla-settext atable 0 0 title) (vla-setrgb accol 255 161 66) (vla-setcellcontentcolor atable 0 0 accol) ;(vla-setrgb accol 0 64 255) (vla-setrgb accol 20 27 105) (vla-SetCellBackgroundColor atable 0 0 accol) (vla-setrgb accol 82 0 0) ;************************************************************************************ ; Populate Column Headers and Data Rows (setq row 1 col 0 ) (foreach sbLst cmLst (foreach strg sbLst (vla-settext atable row col strg) (vla-setcellalignment atable row col acMiddleCenter) (vla-setrgb accol 82 0 0) (vla-setcellcontentcolor atable row col accol) (if (> col 0) (progn (vla-setcelldatatype atable row col acdouble acUnitDistance) (vla-setcellformat atable row col "%lu2%pr2"))) (vla-setrgb accol 255 245 235) (vla-SetCellBackgroundColor atable row col accol) (setq col (1+ col)) ) (setq col 0 row (1+ row))) (vla-insertrows atable 1 (* txtsize 1.5) 1) (setq col 0 row 1) (foreach strg (list "PT." "X" "Y" "Z") (vla-settext atable row col strg) (vla-setcellalignment atable row col acMiddleCenter) (vla-setrgb accol 82 0 0) (vla-setcellcontentcolor atable row col accol) (vla-setrgb accol 249 198 182) (vla-SetCellBackgroundColor atable row col accol) (setq col (1+ col))) ;;;; * * * edit added 1.5 and ) (vla-setcolumnwidth atable 0 (* (getvar 'textsize) 1.5)) (vla-setrowheight atable 1 (* (getvar 'textsize) 1.5)) ;(vla-recomputetableblock atable :vlax-true) ;on the end display table object changes: Every instance of vla-settext ; opens table-block object, writes and closes them.Works pretty slow! (vla-put-regeneratetablesuppressed atable :vlax-false) (vlax-release-object atable) ;release memory used to create this object (vlax-release-object accol) ) ;;; * * * removed 1 ) ; The Create Table Function Accepts 3 Arguments including the ; Insertion point of the table, the Number of Rows and Number of Columns. (defun vla_addTable (insPt ; Insertion Point of Table rows ; Integer Number of Rows in Table cols ; Integer Number of Columns in Table / atable ; Table Object ) (setq txtsize (getvar 'textsize) ;|(variant-value (vla-getvariable (vla-get-activedocument (vlax-get-acad-object)) "textsize"))|; ;commented atable (vla-addtable (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)))) (vlax-3d-point insPt) rows cols (* txtsize 1.25) (* txtsize 2))) atable ) Quote
hosneyalaa Posted February 6, 2019 Author Posted February 6, 2019 18 hours ago, rlx said: you may also learn to use the debug function in the lisp editor 1 don't localize acDataRow acHeaderRow acMiddleCenter acTitleRow (autocad constants) 2 vla_addTable -> vla-addTable (line 154) 3 add table must include document space (Mspace in this case) 4 setcolumn width in line 209 was wrong 5 because of that you released you table object to early (defun c:POP (/ A B pts C COLWIDTH CURSPACE D2 DIS DOC E EL I II LEV LEVI LW N NN NUMCOLUMNS NUMROWS OBJTABLE OUT OUT_P P PL PLL PT1 PTCNTR PTLST PTS ROWHEIGHT S SLIST SSN X1 XY Y Y1 YI Z DIST HH INC LW OUT1 P XY1) (setq el (CAR (entsel "Select a RED LWPOLYLINE : "))) (setq lw (CAR (entsel "Select a GREEN LWPOLYLINE : "))) (setq lev (* 10 27)) (setq inc (getdist "\nSet the increment distance here : ")) (SETQ ht (GETREAL "\n-> Enter text height : ")) (INITGET 7) (COMMAND "PDMODE" 35) (COMMAND "PDSIZE" HT) ;;;(SETQ pt1 (VLAX-3D-POINT (GETPOINT "\n-> Pick point for top left hand of table: "))) (setq i 0) (repeat (- (fix (vlax-curve-getendparam el)) 1) ;RED ;;; (setq d1 (vlax-curve-getdistatparam el i)) (setq d2 (vlax-curve-getdistatparam el (1+ i))) (setq pl (cons (vlax-curve-getpointatdist lw d2) pl)) ;RED (setq i (1+ i)) ) ;REPEAT ;;; (PRINC pl) (setq pll (mapcar '(lambda (p) (trans (list (car p) (cadr p) (cdr (assoc 38 (entget lw)))) lw 0)) (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget lw))))) (setq pll (append pl pll)) (setq ptLst (vl-sort pll '(lambda (a b) (< (car a) (car b))))) (setq x1 (car (car ptLst))) (setq y1 (cadr (car ptLst))) (setq ii 0) (repeat (length ptLst) (setq dis (- (car (nth ii ptLst)) x1)) (setq yi (- (cadr (nth ii ptLst)) y1)) (setq levi (/ (+ lev yi) 10)) (setq xy (vlax-curve-getpointatdist el dis)) (setq out (LIST (CAR xy) (CADR xy) levi)) (setq out_p (cons out out_p)) (setq ii (1+ ii)) ) (setq out_pp (reverse out_p)) ;;; (PRINC xy) (entmake (list '(0 . "POLYLINE") '(100 . "AcDbEntity") '(100 . "AcDb3dPolyline") '(66 . 1) '(62 . 1) '(10 0.0 0.0 0.0) '(70 . 8) '(210 0.0 0.0 1.0)) ) (foreach pt out_pp (entmake (list '(0 . "VERTEX") '(100 . "AcDbEntity") '(100 . "AcDbVertex") '(100 . "AcDb3dPolylineVertex") (cons 10 pt) '(70 . 32) ) ) ) (entmake (list '(0 . "SEQEND") '(100 . "AcDbEntity") ) ) (command "._Change" (entlast) "" "p" "color" "120" "") ;;;;;;;;;;;;;;;;;;;;;;;;; (SETQ n 0) (setq dist 0) (while (setq xy1 (vlax-Curve-GetPointAtDist el dist)) (setq HH (vlax-curve-getpointatdist lw dist)) (setq yi (- (cadr HH) y1)) (setq levi (/ (+ lev yi) 10)) (setq out1 (LIST (CAR xy1) (CADR xy1) levi)) ;;add the point to a list (SETQ pts (CONS (list (ITOA (SETQ n (1+ n))) (car out1) (cadr out1) (cadDr out1)) pts)) ;;; (setq pts(cons out1 pts)) ;;increment the distance for the next point (setq dist (+ dist inc)) (COMMAND "_.TEXT" out1 ht "0" (ITOA n)) (COMMAND "_.POINT" out1 "") ) ;while (if (/= dist dis) (progn (SETQ pts (CONS (list (ITOA (SETQ n (1+ n))) (car out) (cadr out) (cadDr out)) pts)) (COMMAND "_.TEXT" out ht "0" (ITOA n)) (COMMAND "_.POINT" out "") ;;; (setq pts(cons out pts)) )) (setq ptss (reverse pts)) ;;; (setvar 'osmode 0) (setq pAt (getpoint "\nPick table insertion point:")) (lstToTable pAt "COORDINATES" ptss) (princ) (vl-load-com) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun lstToTable (insPt ; List Insertion point of Table title ; String Table Title cmLst ; List of sublists of Values in Rows / accol ;AutoCAD.AcCmColor object col ; Integer Column Item rows ; Integer Number of Rows cols ; Integer Number of Columns row ; Integer Row Item sbLst ; List of Values in a Row atable ; Table Object strg ; String Item in List ActiveDocument mSpace ) (if (not insPt) (setq insPt (getpoint "\nSelect Insertion Point: "))) (setq ActiveDocument (vla-get-activedocument (vlax-get-acad-object))) (setq mSpace(vla-get-modelspace ActiveDocument)) (setq rows (1+ (length cmLst)) cols (apply 'max (mapcar 'length cmLst)) ;;; * * * edit vla_addTable : underscore is wrong , added mspace, point format wrong , row height / width missing atable (vla-addTable mSpace (vlax-3D-point insPt) rows cols 5 10) ) ; to prevent display table changes at runtime: (vla-put-regeneratetablesuppressed atable :vlax-true) ;supres opening and closing table-block object at each writting to table (setq accol (vla-get-truecolor atable)) (vla-setrgb accol 16 37 66) (vla-put-truecolor atable accol) ;************************************************************************************ ; Populate Title and set title (vla-settext atable 0 0 title) (vla-setrgb accol 255 161 66) (vla-setcellcontentcolor atable 0 0 accol) ;(vla-setrgb accol 0 64 255) (vla-setrgb accol 20 27 105) (vla-SetCellBackgroundColor atable 0 0 accol) (vla-setrgb accol 82 0 0) ;************************************************************************************ ; Populate Column Headers and Data Rows (setq row 1 col 0 ) (foreach sbLst cmLst (foreach strg sbLst (vla-settext atable row col strg) (vla-setcellalignment atable row col acMiddleCenter) (vla-setrgb accol 82 0 0) (vla-setcellcontentcolor atable row col accol) (if (> col 0) (progn (vla-setcelldatatype atable row col acdouble acUnitDistance) (vla-setcellformat atable row col "%lu2%pr2"))) (vla-setrgb accol 255 245 235) (vla-SetCellBackgroundColor atable row col accol) (setq col (1+ col)) ) (setq col 0 row (1+ row))) (vla-insertrows atable 1 (* txtsize 1.5) 1) (setq col 0 row 1) (foreach strg (list "PT." "X" "Y" "Z") (vla-settext atable row col strg) (vla-setcellalignment atable row col acMiddleCenter) (vla-setrgb accol 82 0 0) (vla-setcellcontentcolor atable row col accol) (vla-setrgb accol 249 198 182) (vla-SetCellBackgroundColor atable row col accol) (setq col (1+ col))) ;;;; * * * edit added 1.5 and ) (vla-setcolumnwidth atable 0 (* (getvar 'textsize) 1.5)) (vla-setrowheight atable 1 (* (getvar 'textsize) 1.5)) ;(vla-recomputetableblock atable :vlax-true) ;on the end display table object changes: Every instance of vla-settext ; opens table-block object, writes and closes them.Works pretty slow! (vla-put-regeneratetablesuppressed atable :vlax-false) (vlax-release-object atable) ;release memory used to create this object (vlax-release-object accol) ) ;;; * * * removed 1 ) ; The Create Table Function Accepts 3 Arguments including the ; Insertion point of the table, the Number of Rows and Number of Columns. (defun vla_addTable (insPt ; Insertion Point of Table rows ; Integer Number of Rows in Table cols ; Integer Number of Columns in Table / atable ; Table Object ) (setq txtsize (getvar 'textsize) ;|(variant-value (vla-getvariable (vla-get-activedocument (vlax-get-acad-object)) "textsize"))|; ;commented atable (vla-addtable (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object)))) (vlax-3d-point insPt) rows cols (* txtsize 1.25) (* txtsize 2))) atable ) Quote
hosneyalaa Posted February 6, 2019 Author Posted February 6, 2019 Many thanks The answer to my question Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.