kytyrc66 Posted April 21, 2016 Share Posted April 21, 2016 Hello all, I am trying to make a table with: 1. a space division name 2. department name 3. type of space name 4. SQ FT area using a field that will up date when needed I used an attributed block with single line text for all the information added the field for the SQ.FT., the only problem is when it is exported into a table the area is on a different line than the other info..any suggestions?? I did try a multiline text attributed block but that was not any good. Thanks Quote Link to comment Share on other sites More sharing options...
TheCADnoob Posted April 22, 2016 Share Posted April 22, 2016 Im not sure i understand the nature of your problem. Is it possible that the other information is being interpreted as column labels and not data? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 23, 2016 Share Posted April 23, 2016 This may be usefull it reads multiple blocks and creates a table ; dwg index to a table ; by Alan H NOV 2013 (defun AH:dwgindex (/ doc objtable ss1 lay ans ans2 plotabs ss1 tag2 tag3 list1 list2 curlayout colwidth numcolumns numrows INC rowheight ) (vl-load-com) (setq curlayout (getvar "ctab")) (if (= curlayout "Model") (progn (Alert "You need to be in a layout for this option") (exit) ) ; end progn ) ; end if model (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq curspace (vla-get-paperspace doc)) (setq pt1 (vlax-3d-point (getpoint "\nPick point for top left hand of table: "))) ; read values from title blocks (setq bname "DA1DRTXT") (setq tag2 "DRG_NO") ;attribute tag name (setq tag3 "WORKS_DESCRIPTION") ;attribute tag name (setq ss1 (ssget "x" (list (cons 0 "INSERT") (cons 2 bname)))) (if (= ss1 nil) ; for tomkinson jobs (progn (setq bname "COGG_TITLE") (setq ss1 (ssget "x" (list (cons 0 "INSERT") (cons 2 bname)))) ) ) (setq INC (sslength ss1)) (repeat INC (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 (SETQ INC (- INC 1)) )) 'getattributes) (if (= tag2 (strcase (vla-get-tagstring att))) (progn (setq ans (vla-get-textstring att)) (if (/= ans NIL) (setq list1 (cons ans list1)) ) ; if ); end progn ) ; end if (if (= tag3 (strcase (vla-get-tagstring att))) (progn (setq ans2 (vla-get-textstring att)) (if (/= ans2 NIL) (setq list2 (cons ans2 list2)) ) ; end if ) ; end progn ) ; end if tag3 ) ; end foreach ) ; end repeat (setvar 'ctab curlayout) (command "Zoom" "E") (command "regen") (reverse list1) ;(reverse list2) ; now do table (setq numrows (+ 2 (sslength ss1))) (setq numcolumns 2) (setq rowheight 0.2) (setq colwidth 150) (setq objtable (vla-addtable curspace pt1 numrows numcolumns rowheight colwidth)) (vla-settext objtable 0 0 "DRAWING REGISTER") (vla-settext objtable 1 0 "DRAWING NUMBER") (vla-settext objtable 1 1 "DRAWING TITLE") (SETQ X 0) (SETQ Y 2) (REPEAT (sslength ss1) (vla-settext objtable Y 0 (NTH X LIST1)) (vla-settext objtable Y 1 (NTH X LIST2)) (vla-setrowheight objtable y 7) (SETQ X (+ X 1)) (SETQ Y (+ Y 1)) ) (vla-setcolumnwidth objtable 0 55) (vla-setcolumnwidth objtable 1 170) (command "_zoom" "e") ); end AH defun (AH:dwgindex) (princ) Quote Link to comment Share on other sites More sharing options...
kytyrc66 Posted April 25, 2016 Author Share Posted April 25, 2016 Im not sure i understand the nature of your problem. Is it possible that the other information is being interpreted as column labels and not data? I would like to make a room tag that has 1 line for division 1 line for dept 1 line for type 1 line that is a field that has the Square Foot of a polyline Then I would like to window the room tags with the information above and have it all go into a table. If the polyline is updated and the area info changes I would like to see those changes in the room tag field and the table update too. Anyone know of a room tag like this or a way I should go about creating it?? Thanks Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 25, 2016 Share Posted April 25, 2016 The room tag is easy there are lots of examples of linking a field to the area of a pline. Search for just that "ROOM" or "AREA" its a often asked for subject here. You should be able to find something that matches. You need to post a sample dwg it may be a simple fix. Quote Link to comment Share on other sites More sharing options...
kytyrc66 Posted April 26, 2016 Author Share Posted April 26, 2016 I found a way thank you all!! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 27, 2016 Share Posted April 27, 2016 A good idea is to post what was your answer, its helpfull for the next person was it answered over at AUGI.com Quote Link to comment Share on other sites More sharing options...
kytyrc66 Posted April 27, 2016 Author Share Posted April 27, 2016 A good idea is to post what was your answer, its helpfull for the next person was it answered over at AUGI.com No it was not answered by AUGI. I search and search found a YouTube video explaining fields and attributes... The only thing I wish I could do with this example is that when you open the attribute advance editor to change the information to be about another polyline is that it would hold the settings for the scale factor. other thatn that it does the job I needed done. Quote Link to comment Share on other sites More sharing options...
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.