![]() Select all the table objects visible on screen (setq vector (vlax-make-safearray vlax-vbDouble '(0. (setq uprRight (list ( (nth 0 (getvar "viewctr")) (/ vWidth 2)) ( (nth 1 (getvar "viewctr")) (/ vHeight 2)) 0)) (setq lwrLeft (list (- (nth 0 (getvar "viewctr")) (/ vWidth 2)) (- (nth 1 (getvar "viewctr")) (/ vHeight 2)) 0)) (setq vWidth (* (/ (nth 0 (getvar "screensize")) (nth 1 (getvar "screensize"))) vHeight)) ![]() Get the corners of the screen display to build our selection set (if (/= (setq pick (vlax-3d-point (getpoint "\nSelect Cell to edit: "))) nil) SS_TABLES cnt eMax tableObj row col cellValueOrg) (defun c:SelectTableCell ( / pick vHeight vWidth lwrLeft uprRight vector This example demonstrates the ActiveX properties/methods HitTest, Example shows how to pick a single table cell on screen and change its value. (vla-put-StyleName tableObj "MyTableStyle") (setq tableObj (vla-Addtable mSpaceObj insPt 5 3 10 30)) (setq mSpaceObj (vla-get-ModelSpace curDoc)) (setq curDoc (vla-get-ActiveDocument acadObj)) (defun c:AddTable( / acadObj curDoc insPt mSpaceObj tableObj) with a row height of 10 units and column width of 30 units Example adds a table to model space that is 5 rows by 3 columns In this article, I show for to create a table and then edit the value of a cell by picking a point within a table cell. In the previous posting, Creating a Table Style with AutoLISP and the ActiveX API, I showed an exmple of how to create a custom table style. Tables are made up of individual cells which can contain text, blocks, and formulas along with additional formatting. The appearance of a table is controlled by its properties and methods, along with the table style that it is assigned.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |