Jump to content

Search the Community

Showing results for tags 'table'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. In a normal table I want to add a row It works perfectly. In a different existing table with the exact same table style as above, I want to add a row I get this as a result There are no line breaks in the properties Can someone tell me how to make the existing table style "work" correctly? Please tell me what is happening here please?
  2. Hello, I am searching for a lisp that can export the lengths of all selected polylines and export them to either Excel or an AutoCad table. I have found and tested around 20 lisps but so far cannot find the right one. There were only 2 that look promising, maybe they could be modified? One was by Lee Mac and the other Jimmy Bergmark. I can post the 2 Lisp if needed. The lisp would need to have you select multiple polylines and give the total lengths of each polyline in the order that they were selected in. Then the data would either appear on an AutoCad table or Excel. Thanks for any help that can be provided.
  3. (defun c:M2atchTableOverrides (/ Sel FromObj ToObj cnt TitleList HeaderList DataList tempCnt RowCnt GetValue) (if (and (setq Sel (entsel "\n Select table to copy properties from: ")) (setq FromObj (vlax-ename->vla-object (car Sel))) (= (vla-get-ObjectName FromObj) "AcDbTable") (setq Sel (entsel "\n Select table to copy properties to: ")) (setq ToObj (vlax-ename->vla-object (car Sel))) (= (vla-get-ObjectName ToObj) "AcDbTable") ) (progn (vla-put-RegenerateTableSuppressed ToObj :vlax-true) (foreach RowType (list (cons acDataRow "Data Row") (cons acHeaderRow "Header Row") (cons acTitleRow "Title Row") (cons acUnknownRow "Unknow Row")) (mapcar '(lambda (SetStr GetStr) (if (vl-catch-all-error-p (vl-catch-all-apply 'vlax-invoke (list ToObj SetStr (car RowType) (setq GetValue (vlax-invoke FromObj GetStr (car RowType))) ) ) ) (prompt (strcat "\n Couldn't set property \"" (substr SetStr 4) "\" for row type \"" (cdr RowType) "\" to [ " (vl-princ-to-string GetValue) " ]" ) ) ) ) '("SetContentColor" "SetTextHeight" "SetTextStyle" "SetRowHeight" "SetColumnWidth") '("GetContentColor" "GetTextHeight" "GetTextStyle" "GetRowHeight" "GetColumnWidth") ) ) (setq cnt 0) (if (= (vla-get-TitleSuppressed FromObj) :vlax-false) (progn (setq TitleList (list (vlax-invoke FromObj 'GetCellTextStyle cnt 0) (vlax-invoke FromObj 'GetCellTextHeight cnt 0) (vlax-invoke FromObj 'GetCellContentColor cnt 0) (vlax-invoke FromObj 'GetRowHeight cnt) ) ) (setq cnt (1+ cnt)) ) ) (if (= (vla-get-HeaderSuppressed FromObj) :vlax-false) (progn (setq HeaderList (list (vlax-invoke FromObj 'GetCellTextStyle cnt 0) (vlax-invoke FromObj 'GetCellTextHeight cnt 0) (vlax-invoke FromObj 'GetCellContentColor cnt 0) (vlax-invoke FromObj 'GetRowHeight cnt) ) ) (setq cnt (1+ cnt)) ) ) (setq DataList (list (vlax-invoke FromObj 'GetCellTextStyle cnt 0) (vlax-invoke FromObj 'GetCellTextHeight cnt 0) (vlax-invoke FromObj 'GetCellContentColor cnt 0) (vlax-invoke FromObj 'GetRowHeight cnt) ) ) (setq cnt 0) (if (and (= (vla-get-TitleSuppressed ToObj) :vlax-false) TitleList ) (progn (setq tempCnt 0) (vlax-invoke ToObj 'SetRowHeight cnt (cadddr TitleList)) (repeat (vla-get-Columns ToObj) (mapcar '(lambda (a b) (vlax-invoke ToObj a cnt tempCnt b) ) '("SetCellTextStyle" "SetCellTextHeight" "SetCellContentColor") TitleList ) (setq tempCnt (1+ tempCnt)) ) (setq cnt (1+ cnt)) ) ) (if (and (= (vla-get-HeaderSuppressed ToObj) :vlax-false) HeaderList ) (progn (vlax-invoke ToObj 'SetRowHeight cnt (cadddr HeaderList)) (setq tempCnt 0) (repeat (vla-get-Columns ToObj) (mapcar '(lambda (a b) (vlax-invoke ToObj a cnt tempCnt b) ) '("SetCellTextStyle" "SetCellTextHeight" "SetCellContentColor") HeaderList ) (setq tempCnt (1+ tempCnt)) ) (setq cnt (1+ cnt)) ) ) (setq RowCnt cnt) (repeat (- (vla-get-Rows ToObj) cnt) (vlax-invoke ToObj 'SetRowHeight RowCnt (cadddr DataList)) (setq tempCnt 0) (repeat (vla-get-Columns ToObj) (mapcar '(lambda (a b) (vlax-invoke ToObj a RowCnt tempCnt b) ) '("SetCellTextStyle" "SetCellTextHeight" "SetCellContentColor") DataList ) (setq tempCnt (1+ tempCnt)) ) (setq RowCnt (1+ RowCnt)) ) (vla-put-RegenerateTableSuppressed ToObj :vlax-false) ) ) (princ) ) This one, you click the original table (with right height cell and text,) than second click on table you desire to migrate same propriteis. My Goal is change second click to select multi table (more than one, like select all by hold right mouse bottom) . thx
  4. Working to standardize a bill of material drawing that must consist of nothing more than text, lines, and blocks for a client that refuses to use datalinks and I was hoping to find a way to create a standard block that could act as a row in the table with cells containing text fields. Essentially, I would like to have the functionality of attribute definitions but have them copy down using some kind of array action. Has anyone had any luck/experience with something like this? I understand it's might be kind of impossible. Attached is what I'm hoping to have as default text in the newly generated row as the user pulls down the array arrow.
  5. After this discussion it was determined that a table style cannot be replaced in a simple step like you with blocks. Replace Table Style I was attempting to write a routine to rename three table styles so that I can bring in "new and improved" versions of those tables from a template. Given Tablestyles: Style1, Style2 & Style3 I'd like to rename to OLD1, OLD2 & OLD3 respectively... I do not know what I'm doing. This does not work at all. (defun C:RTS2 (/ oldname newname tbllist);;; (setq oldname "STYLE1" newname "OLD1") (setq tbllist (tblstyle)) (if (member oldname tbllist) (progn (command "tablestyle" oldname "rename" newname) (princ (strcat "Table style " oldname " renamed to " newname)) ) (princ (strcat "Table style " oldname " not found")) ) (princ) ) I found some code by Lee for deleting a Tablestyle but way over my head to modify to suit.. (defun c:deltab ( / dic sty ) ;;;Lee Mac (if (setq dic (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_TABLESTYLE")))) (progn (while (not (or (= "" (setq sty (getstring t "\nSpecify Table Style to Delete: "))) (dictsearch dic sty) ) ) (princ "\nTable Style not found.") ) (if (/= "" sty) (dictremove dic sty)) ) (princ "\nTable Styles not present in this version.") ) (princ) ) Lee says this is dangerous but may have some value for my use (defun c:deltab ( / dic ) (if (setq dic (cdr (assoc -1 (dictsearch (namedobjdict) "ACAD_TABLESTYLE")))) (foreach sty '("Style1" "Style2" "Style3") (dictremove dic sty) ;;I'm not wanting to delete them but rename them... ) (princ "\nTable Styles not present in this version.") ) (princ) )
  6. Hi. I've asked a question like this before. But I couldn't solve it, so I asked for your help again. (Emmanuel Delay's lisp does not add up the numbers...) There are numbers(mtext) assigned to different layers. I'd like to get the total of each of these numbers by layer. ex) Layer / Contents AA / 1.5 AA / 2.5 AA / 1.0 => BB / 2.0 BB / 2.0 And I want to tabulate those values with the layer name and the sum. I am attaching the type of lisp I want. But it's not perfect for me to use. So I want to modify it and use it, but it is a vlx format. Please make the same lisp as above. textcount.lsp SAMPLE.dwg pdtt.VLX
  7. Our company uses "hand" as the style for all our projects. I need to import a table from excel with excel formatting. After I change all the text to "hand" style I can't figure out how to change the font. Any help would be greatly appreciated!!
  8. Hello, I am new to LISP, I found the Area-to-Table LISP from Lee Mac, which is very useful, but I need it to write the area in the third column of the table instead of the second. I modified some parameters to create the third column and the first row of the table works, but the following rows don't. Also I would like to have the numbers that are inserted in the centroid in a circle, but this could be optional. The text should be 0.3 in height and the circle should have a 0.25 radius. I defined the style at the beginning, but the height does not work. I would be grateful for some help, thank you! This is the LISP: (defun c:Recap nil (AreaLabel t)) ;; Areas to Table ;start of sectin added to define text style (entmakex '( (0 . "STYLE") (100 . "AcDbSymbolTableRecord") (100 . "AcDbTextStyleTableRecord") (2 . "room_Style") (70 . 0) (40 . 0.3);<- text height defined (41 . 1.0) (50 . 0.0) (71 . 0) (42 . 2.0) (3 . "times.ttf") (4 . "") ) ) (setvar 'textstyle "room_Style") ; end of section added to define text style ;;------------------------------------------------------------;; (defun AreaLabel ( flag / *error* _startundo _endundo _centroid _text _open _select _getobjectid _isannotative acdoc acspc ap ar as cf cm el fd fl fo n of om p1 pf pt sf st t1 t2 t3 tb th ts tx ucsxang ucszdir ) ;;------------------------------------------------------------;; ;; Adjustments ;; ;;------------------------------------------------------------;; (setq h1 "Recap Table" ;; Heading t1 "Numer" ;; Number Title t2 "Room" ;;Area Name t3 "Area" ;; Area Title pf "" ;; Number Prefix (optional, "" if none) sf "" ;; Number Suffix (optional, "" if none) ap "" ;; Area Prefix (optional, "" if none) as "" ;; Area Suffix (optional, "" if none) cf 1.0 ;; Area Conversion Factor (e.g. 1e-6 = mm2->m2) fd t ;; Use fields to link numbers/objects to table (t=yes, nil=no) fo "%lu6%qf1" ;; Area field formatting ) ;;------------------------------------------------------------;; (defun *error* ( msg ) (if cm (setvar 'CMDECHO cm)) (if el (progn (entdel el) (setq el nil))) (if acdoc (_EndUndo acdoc)) (if (and of (eq 'FILE (type of))) (close of)) (if (and Shell (not (vlax-object-released-p Shell))) (vlax-release-object Shell)) (if (null (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")) (princ (strcat "\n--> Error: " msg)) ) (princ) ) ;;------------------------------------------------------------;; (defun _StartUndo ( doc ) (_EndUndo doc) (vla-StartUndoMark doc) ) ;;------------------------------------------------------------;; (defun _EndUndo ( doc ) (if (= 8 (logand 8 (getvar 'UNDOCTL))) (vla-EndUndoMark doc) ) ) ;;------------------------------------------------------------;; (defun _centroid ( space objs / reg cen ) (setq reg (car (vlax-invoke space 'addregion objs)) cen (vlax-get reg 'centroid) ) (vla-delete reg) (trans cen 1 0) ) ;;------------------------------------------------------------;; (defun _text ( space point string height rotation / text ) (setq text (vla-addtext space string (vlax-3D-point point) height)) (vla-put-alignment text acalignmentmiddlecenter) (vla-put-textalignmentpoint text (vlax-3D-point point)) (vla-put-rotation text rotation) text ) ;;------------------------------------------------------------;; (defun _Open ( target / Shell result ) (if (setq Shell (vla-getInterfaceObject (vlax-get-acad-object) "Shell.Application")) (progn (setq result (and (or (eq 'INT (type target)) (setq target (findfile target))) (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-invoke (list Shell 'Open target)) ) ) ) ) (vlax-release-object Shell) ) ) result ) ;;------------------------------------------------------------;; (defun _Select ( msg pred func init / e ) (setq pred (eval pred)) (while (progn (setvar 'ERRNO 0) (apply 'initget init) (setq e (func msg)) (cond ( (= 7 (getvar 'ERRNO)) (princ "\nMissed, try again.") ) ( (eq 'STR (type e)) nil ) ( (vl-consp e) (if (and pred (not (pred (setq e (car e))))) (princ "\nInvalid Object Selected.") ) ) ) ) ) e ) ;;------------------------------------------------------------;; (defun _GetObjectID ( doc obj ) (if (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")) (vlax-invoke-method (vla-get-Utility doc) 'GetObjectIdString obj :vlax-false) (itoa (vla-get-Objectid obj)) ) ) ;;------------------------------------------------------------;; (defun _isAnnotative ( style / object annotx ) (and (setq object (tblobjname "STYLE" style)) (setq annotx (cadr (assoc -3 (entget object '("AcadAnnotative"))))) (= 1 (cdr (assoc 1070 (reverse annotx)))) ) ) ;;------------------------------------------------------------;; (setq acdoc (vla-get-activedocument (vlax-get-acad-object)) acspc (vlax-get-property acdoc (if (= 1 (getvar 'CVPORT)) 'Paperspace 'Modelspace)) ucszdir (trans '(0. 0. 1.) 1 0 t) ucsxang (angle '(0. 0. 0.) (trans (getvar 'UCSXDIR) 0 ucszdir)) ) (_StartUndo acdoc) (setq cm (getvar 'CMDECHO)) (setvar 'CMDECHO 0) (setq om (eq "1" (cond ((getenv "LMAC_AreaLabel")) ((setenv "LMAC_AreaLabel" "0"))))) (setq ts (/ (getvar 'TEXTSIZE) (if (_isAnnotative (getvar 'TEXTSTYLE)) (cond ( (getvar 'CANNOSCALEVALUE) ) ( 1.0 )) 1.0 ) ) ) (cond ( (not (vlax-method-applicable-p acspc 'addtable)) (princ "\n--> Table Objects not Available in this Version.") ) ( (= 4 (logand 4 (cdr (assoc 70 (tblsearch "LAYER" (getvar 'CLAYER)))))) (princ "\n--> Current Layer Locked.") ) ( (not (setq *al:num (cond ( (getint (strcat "\nSpecify Starting Number <" (itoa (setq *al:num (1+ (cond ( *al:num ) ( 0 ))))) ">: " ) ) ) ( *al:num ) ) ) ) ) ( flag (setq th (* 2. (if (zerop (setq th (vla-gettextheight (setq st (vla-item (vla-item (vla-get-dictionaries acdoc) "ACAD_TABLESTYLE" ) (getvar 'CTABLESTYLE) ) ) acdatarow ) ) ) ts (/ th (if (_isAnnotative (vla-gettextstyle st acdatarow)) (cond ( (getvar 'CANNOSCALEVALUE) ) ( 1.0 )) 1.0 ) ) ) ) ) (if (cond ( (progn (initget "Add") (vl-consp (setq pt (getpoint "\nPick Point for Table <Add to Existing>: "))) ) (setq tb (vla-addtable acspc (vlax-3D-point (trans pt 1 0)) 2 3 th (* 1.2 th (max (strlen t1) (strlen t2) (strlen t3))) ;chage tabel row, column, column height ) ) (vla-put-direction tb (vlax-3D-point (getvar 'UCSXDIR))) (vla-settext tb 0 0 h1) (vla-settext tb 1 0 t1) (vla-settext tb 1 1 t2) (vla-settext tb 1 2 t3) (while (progn (if om (setq p1 (_Select (strcat "\nSelect Object [Pick] <Exit>: ") '(lambda ( x ) (and (vlax-property-available-p (vlax-ename->vla-object x) 'area) (not (eq "HATCH" (cdr (assoc 0 (entget x))))) (or (eq "REGION" (cdr (assoc 0 (entget x)))) (vlax-curve-isclosed x)) ) ) entsel '("Pick") ) ) (progn (initget "Object") (setq p1 (getpoint "\nPick Area [Object] <Exit>: "))) ) (cond ( (null p1) (vla-delete tb) ) ( (eq "Pick" p1) (setq om nil) t ) ( (eq "Object" p1) (setq om t) ) ( (eq 'ENAME (type p1)) (setq tx (cons (_text acspc (_centroid acspc (list (setq p1 (vlax-ename->vla-object p1)))) (strcat pf (itoa *al:num) sf) ts ucsxang ) tx ) ) (vla-insertrows tb (setq n 2) th 1) (vla-settext tb n 2 ;changed here from 1 to 2 (if fd (strcat "%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc p1) ">%).Area \\f \"" fo "\">%" ) (strcat ap (rtos (* cf (vla-get-area p1)) 2) as) ) ) (vla-settext tb n 0 (if fd (strcat "%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc (car tx)) ">%).TextString>%" ) (strcat pf (itoa *al:num) sf) ) ) nil ) ( (vl-consp p1) (setq el (entlast)) (vl-cmdf "_.-boundary" "_A" "_I" "_N" "" "_O" "_P" "" "_non" p1 "") (if (not (equal el (setq el (entlast)))) (progn (setq tx (cons (_text acspc (_centroid acspc (list (vlax-ename->vla-object el))) (strcat pf (itoa *al:num) sf) ts ucsxang ) tx ) ) (vla-insertrows tb (setq n 2) th 1) (vla-settext tb n 1 (strcat ap (rtos (* cf (vlax-curve-getarea el)) 2) as)) (vla-settext tb n 0 (if fd (strcat "%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc (car tx)) ">%).TextString>%" ) (strcat pf (itoa *al:num) sf) ) ) (redraw el 3) nil ) (vla-delete tb) ) ) ) ) ) (not (vlax-erased-p tb)) ) ( (and (setq tb (_Select "\nSelect Table to Add to: " '(lambda ( x ) (eq "ACAD_TABLE" (cdr (assoc 0 (entget x))))) entsel nil ) ) (< 1 (vla-get-columns (setq tb (vlax-ename->vla-object tb)))) ) (setq n (1- (vla-get-rows tb)) *al:num (1- *al:num)) ) ) (progn (while (if om (setq p1 (_Select (strcat "\nSelect Object [" (if tx "Undo/" "") "Pick] <Exit>: ") '(lambda ( x ) (and (vlax-property-available-p (vlax-ename->vla-object x) 'area) (not (eq "HATCH" (cdr (assoc 0 (entget x))))) (or (eq "REGION" (cdr (assoc 0 (entget x)))) (vlax-curve-isclosed x)) ) ) entsel (list (if tx "Undo Pick" "Pick")) ) ) (progn (initget (if tx "Undo Object" "Object")) (setq p1 (getpoint (strcat "\nPick Area [" (if tx "Undo/" "") "Object] <Exit>: "))) ) ) (cond ( (and tx (eq "Undo" p1)) (if el (progn (entdel el) (setq el nil))) (vla-deleterows tb n 1) (vla-delete (car tx)) (setq n (1- n) tx (cdr tx) *al:num (1- *al:num)) ) ( (eq "Undo" p1) (princ "\n--> Nothing to Undo.") ) ( (eq "Object" p1) (if el (progn (entdel el) (setq el nil))) (setq om t) ) ( (eq "Pick" p1) (setq om nil) ) ( (and om (eq 'ENAME (type p1))) (setq tx (cons (_text acspc (_centroid acspc (list (setq p1 (vlax-ename->vla-object p1)))) (strcat pf (itoa (setq *al:num (1+ *al:num))) sf) ts ucsxang ) tx ) ) (vla-insertrows tb (setq n (1+ n)) th 1) (vla-settext tb n 1 (if fd (strcat "%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc p1) ">%).Area \\f \"" fo "\">%" ) (strcat ap (rtos (* cf (vla-get-area p1)) 2) as) ) ) (vla-settext tb n 0 (if fd (strcat "%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc (car tx)) ">%).TextString>%" ) (strcat pf (itoa *al:num) sf) ) ) ) ( (vl-consp p1) (if el (progn (entdel el) (setq el nil))) (setq el (entlast)) (vl-cmdf "_.-boundary" "_A" "_I" "_N" "" "_O" "_P" "" "_non" p1 "") (if (not (equal el (setq el (entlast)))) (progn (setq tx (cons (_text acspc (_centroid acspc (list (vlax-ename->vla-object el))) (strcat pf (itoa (setq *al:num (1+ *al:num))) sf) ts ucsxang ) tx ) ) (vla-insertrows tb (setq n (1+ n)) th 1) (vla-settext tb n 1 (strcat ap (rtos (* cf (vlax-curve-getarea el)) 2) as)) (vla-settext tb n 0 (if fd (strcat "%<\\AcObjProp Object(%<\\_ObjId " (_GetObjectID acdoc (car tx)) ">%).TextString>%" ) (strcat pf (itoa *al:num) sf) ) ) (redraw el 3) ) (princ "\n--> Error Retrieving Area.") ) ) ) ) (if el (progn (entdel el) (setq el nil))) ) ) ) ) (setenv "LMAC_AreaLabel" (if om "1" "0")) (setvar 'CMDECHO cm) (_EndUndo acdoc) (princ) ) ;;------------------------------------------------------------;; ;; End of File ;; ;;------------------------------------------------------------;;
  9. Hello, I have created a table within AutoCAD. I have written some words in cell "A1", I would like to display the same words in another cell using an equation "=A1". When I type the "=A1" equation the cell displays "####" Is there anyway to make this work? possibly using fields? Thanks
  10. Im doing quantity takeoff of a building and just introduced to custom Lisps by google search. i wonder if the below task is doable using lisp. 1. batch label polylines (multiple selected polylines labelled with incremental numbers prefixed to a text which can be entered manually, for example, 1-Beam1, 2-Beam1 etc.. 1-Beam2, 2-Beam2 and so on). perhaps modify the attached lisp that labels selected polylines with its layer name ll-Label A line with its own layer name.lsp which i got from internet 2. create a table that would contain the label (as given by the above lisp), layer name, length, and area of selected polylines one by one. something like the attached lisp which create length and area of selected polylines. test area length.lsp i got that too from internet and originally gave polyline lengths and i modified it to give area too. thank you all
  11. Hello, I am attempting to put together a LISP that creates a table of cumulative geometric properties of selected objects. I would like to be able to quantify Erosion and Sedimentation Control BMPs by layer for a cost estimation. Controls such as compost filter sock and orange construction fence are polylines, erosion control blanket is hatched, and inlet protection is a block. The controls are all on their own respective layers. The idea is that I would be able to select one occurrence of each of these controls (polyline, hatch, block), have the LISP apply the "select similar" command, and create a table that reports back the length of the polylines by layer, the cumulative area of the hatches by layer, and a count of the blocks by layer. Due to my inexperience with LISP, I am afraid that I am unable to create this app in time for when I need it. It would be greatly appreciated if someone could help out in creating this app. Thank you for your time.
  12. I have a table in AutoCAD Architecture 2013. If I click in a cell, acad highlights the cell with extremely thick borders, as shown in the image below. I guess this was because of the table line weight settings, so I tried to change the table style, cell style, set different grid line weight for all grid lines, etc. Nothing works. Here is the dwg file. CellHighlight.dwg Thanks for any suggestions!
  13. Hello, I have been trying for the last few days to automate out a process but have found myself pretty stuck. The process now involves manually going in and looking at the properties of the polyline and copying over the length to a separate excel file and matching it to the block that it goes to. The blocks all have their locations recorded on a separate excel file. The best lead that I have right now is that I can use Data Extraction to pull all of the poly line data at once. However sadly the Data Extraction command cannot pull information of the vertexes of polylines. This is where i need help! I was thinking that I could get around this by assigning the location of the first vertex of the polyline's (the start point 's) X and Y coordinates to the hyperlink, which CAN be extracted with Data Extraction. With the X and Y coordinates I would be able to cross compare the X and Y coordinates with the one from the block and know which it is matched too. I am very new to using LISP and have attempted to write it myself with little success. I am not sure how to write in the Hyperlink just as a string rather than as an actual address. I would like to be able to select all of the polylines at once and have to command change all the hyperlinks at once. Thanks in advance for the help, I am exited to get better at using LISP! Leo
  14. Hi As a small estimation routene, I would like to extract block scale values (not attributes) into a table, and into excel. My drawing is mostly created out of scaled blocks. From a selection window of items, I would like to make out a table (and export to excel) : Preview Block Name X Scale Y scale Number of items I wouldnt know if its possible, to automatically number the items in the drawing, and correspond them with the table and excel, so we can relate the item with the sheet Its an extension of Lee's Count routene, which I would like to take into excel and then do the formatting and the math to pull out some bill of materials Any suggestions ??? Thanks
  15. Vanilla Autocad 2020. I have split a table and want to move the "second table" to another sheet. Is this possible? Could someone please explain the process? Any best options for splitting a long table across multiple sheets? Also, is dragging the bottom caret at the table the only way to split the table? Inventor allows you to pick a line in the table, RMB and pick Table Split. Didn't know if Autocad has a similar option.. Thank you!
  16. I have found many people asking this question but no answers. Is it possible and can someone please explain how to adjust the line spacing within a TABLE CELL? (Autocad 2020) I want to change this: to something like this: Please help!
  17. Hi Guys, I have an AutoLISP that creates an Excel sheet from selected table in an AutoCAD Drawing. It exports tables formed by lines and texts, also recognizing what should be merged cells. It opens a new Excel spreadsheet and fill the respective cells. Works like a charm for the job I need to do. However, It does have a flaw. It doesn't saves the generated sheet. I have to do it manually. Can you guys please help-me to complete this LISP? I Have zero programming knowledge. What I'd like it to do is to save the generated spreadsheet in the same folder as the autocad file, with the same name as the autocad file. Lilke DWG001.DWG would save a spreadsheet called DWG001.xls I'll attach my current AutoLISP file. Thanks in advance, guys. TE_TableExport_Exporta tabelas com linhas e textos para Excel.lsp
  18. Need a small help to modify a lisp. The lisp attached here is working, Normally command 'CN' allow me to place a "CRBLK" block with incremental number for ATT TAG "00" as i click where i wants.later when using command "FCRT" i will get all the attributes tag value and Coordinates in a individual separate Tables (As Field text). Just need some small modifications to add another Attribute in same block with value "IL=00" which i can edit later by clicking on it (attribute editor). and later when using command "FCRT", it'll also gives the output as ATT tag values then coordinates then Second ATT Tag Value individual separate Tables. The existing lisp is working good, just needs some small modification, Though its a long lisp codes and i have no idea on this.. Have attached a screenshot, DWG and Lisp file for reference.. Thanks. here is the long lisp code ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Title: Cordinates with Table ;; ;; Purpose: Numbering & create table ;; ;; Written: Bijoy Manoharan ;; ;; Command: CN, CSN, RES, CRT ;; ;; Date : Sep-2011 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Modifications: ;; ;; 1-fixed list sorting function ;; ;; 2-aded fields table command FCRT ;; ;; Written: Mahmoud Awad ;; ;; Date : Dec-2015 ;; ;; Mail :mmawad@ymail.com ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sub function error (defun trap1 (errmsg) (setvar "attdia" ad) (setvar "attreq" aq) (setq *error* temperr) (prompt "\n Enter Command CSN for Point Sub Numbering or CRT for Table") (princ) ) ;defun (defun trap2 (errmsg) (setvar "attdia" ad) (setvar "attreq" aq) (setq *error* temperr) (prompt "\n Enter Command CN to Continue Point Numbering or CRT for Table") (princ) ) ;defun (defun trap3 (errmsg) (setq *error* temperr) (prompt "\nCoordinate Table Command Cancelled") (princ) ) ;defun ;;-----------------------------------sub function to create block ;;;--- create block function start ----- (defun crb ( ) (if (not (tblsearch "BLOCK" "CRBLK")) (progn (if (not (tblsearch "STYLE" "Isocp")) (entmake (list (cons 0 "STYLE") (cons 100 "AcDbSymbolTableRecord") (cons 100 "AcDbTextStyleTableRecord") (cons 2 "Isocp") (cons 70 0) (cons 40 2.5) (cons 3 "Isocp.ttf") ) ) ) (entmake (list (cons 0 "BLOCK") (cons 8 "0") (cons 370 0) (cons 2 "CRBLK") (cons 70 2) (cons 4 "Block to Place Coordinate Points") (list 10 0.0 0.0 0.0) ) ) (entmake (list (cons 0 "CIRCLE") (cons 8 "0") (cons 370 0) (list 10 0.0 0.0 0.0) (cons 40 1.25) ) ) (entmake (list (cons 0 "ATTDEF") (cons 8 "0") (cons 370 0) (cons 7 "Isocp") (list 10 3.0 2.5 0.0) (list 11 3.0 2.5 0.0) (cons 40 2.5) (cons 1 "00") (cons 3 "Coordinate Point") (cons 2 "00") (cons 70 0) (cons 72 0) (cons 74 2) ) ) (entmake (list (cons 0 "ENDBLK") (cons 8 "0") ) ) ;;;--- To set block units in metre 70-6 ( (lambda ( lst ) (regapp "ACAD") (entmod (append (subst (cons 70 6) (assoc 70 lst) lst) (list (list -3 (list "ACAD" (cons 1000 "DesignCenter Data") (cons 1002 "{") (cons 1070 1) (cons 1070 1) (cons 1002 "}") ) ) ) ) ) ) (entget (cdr (assoc 330 (entget (tblobjname "BLOCK" "CRBLK"))))) ) ;;;--- To make block annotative ( (lambda ( lst ) (regapp "ACAD") (regapp "AcadAnnotative") (entmod (append (subst (cons 70 1) (assoc 70 lst) lst) (list (list -3 (list "ACAD" (cons 1000 "DesignCenter Data") (cons 1002 "{") (cons 1070 1) (cons 1070 1) (cons 1002 "}") ) (list "AcadAnnotative" (cons 1000 "AnnotativeData") (cons 1002 "{") (cons 1070 1) (cons 1070 1) (cons 1002 "}") ) ) ) ) ) ) (entget (cdr (assoc 330 (entget (tblobjname "BLOCK" "CRBLK"))))) ) ) ) ;;;--- to disable allow explod----- (vl-load-com) (setq BLOCKS (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object) ) ) BLK (vla-Item BLOCKS "CRBLK") ) (vla-put-explodable (vla-Item BLOCKS "CRBLK") :vlax-false) ;;;--- end to disable allow explod----- (princ) ) ;;;--- create function block end ----- ;;------------------------main functions------- (defun c:CN(/ num num1 pt ptlist name mh-text ad aq) (command "cmdecho"0) (setq clay (getvar "clayer")) (setq ad (getvar "attdia")) (setq aq (getvar "attreq")) (setq temperr *error*) (setq *error* trap1) (setvar "attdia" 0) (setvar "attreq" 1) ;;; input text name (if (not namef) (setq namef "")) (setq name (getstring (strcat "\nEnter prefix text <" namef ">: "))) (if (= name "") (setq name namef) (setq namef name)) ;;; input number (if (not nf-ns) (setq nf-ns 1)) ; default number (setq NUM (getreal (strcat "\nEnter point number : <" (rtos nf-ns 2 0) ">: "))) (if (not num) (setq num nf-ns) (setq nf-ns num)) ; to create new layer (if (not (tblsearch "layer" "Coordinate Points")) (command "-LAYER" "N" "Coordinate Points" "C" "7" "Coordinate Points" "LT" "Continuous" "Coordinate Points""LW" "0.00" "Coordinate Points" "")) ;;; create mh numbers (setq ptlist nil) ; for while command (while (progn (setq PT (getpoint "\nPick point location: ")) ;;; input text location (if (< num 10.0) (setq num1 (strcat "0" (rtos num 2 0)))) (if (>= num 10.0) (setq num1 (rtos NUM 2 0))) (crb) ;create block (setq mh-text (strcat name num1)) ; combine text into one variable (if (not (= pt nil)) (command "CLAYER" "Coordinate Points")) ;if (if (not (= pt nil)) (command "-insert" "CRBLK" pt "1" "1" "0" mh-text)) ;if (if (not (= pt nil)) (setvar "clayer" clay)) ;if (setq by (strcat (Chr 66)(Chr 73)(Chr 74)(Chr 79)(Chr 89)(Chr 183)(Chr 86)(Chr 183)(Chr 77))) (if (not (= pt nil)) (setq num (+ num 1))) ; for increment (if (not (= pt nil)) (setq suf (- num 1))) (if (not (= pt nil)) (setq nf-ns num)) (setq ptlist (append ptlist (list pt))) ; to stop while command ) ;progn ) ;while (setvar "clayer" clay) (princ) ) ;defun (defun c:CSN(/ numf snum sf-ss mh-text pt ptlist ptx pty name ad aq) (command "cmdecho"0) (setq clay (getvar "clayer")) (setq ad (getvar "attdia")) (setq aq (getvar "attreq")) (setq temperr *error*) (setq *error* trap2) (setvar "attdia" 0) (setvar "attreq" 1) ;;; input name (if (not namef) (setq namef "")) (setq name (getstring (strcat "\nEnter prefix text <" namef ">: "))) (if (= name "") (setq name namef) (setq namef name)) ;;; input number (if (not suf) (setq suf 1)) ; default number (setq NUMF (getreal (strcat "\nEnter point number : <" (rtos suf 2 0) ">: "))) (if (not numf) (setq numf suf) (setq suf numf)) ;;; input sub number (if (not sf-ss) (setq sf-ss 1)) ; default number (setq SNUM (getreal (strcat "\nEnter point subnumber : <" (rtos sf-ss 2 0) ">: "))) (if (not snum) (setq snum sf-ss) (setq sf-ss snum)) ;;; set arial.ttf to default linestyle (if (not (tblsearch "style" "Isocp")) (command "-style" "Isocp" "Isocp.ttf" 2.5 "1" 0 "n" "n")) ; to create new layer (if (not (tblsearch "layer" "Coordinate Points")) (command "-LAYER" "N" "Coordinate Points" "C" "7" "Coordinate Points" "LT" "Continuous" "Coordinate Points""LW" "0.00" "Coordinate Points" "")) ;;; create NO numbers (setq ptlist nil) ; for while command (while (progn (setq PT (getpoint "\nPick Point location: ")) ;;; input text location (if (< numf 10.0) (setq numf1 (strcat "0" (rtos numf 2 0)))) (if (>= numf 10.0) (setq numf1 (rtos numf 2 0))) (if (< snum 10.0) (setq snum1 (strcat "0" (rtos snum 2 0)))) (if (>= snum 10.0) (setq snum1 (rtos snum 2 0))) (crb) ;create block (setq mh-text (strcat name numf1 "-" snum1)) ; combine text into one variable (if (not (= pt nil))(command "CLAYER" "Coordinate Points")) (if (not (= pt nil))(command "-insert" "CRBLK" pt "1" "1" "0" mh-text)) (if (not (= pt nil))(setvar "clayer" clay)) (if (not (= pt nil))(setq snum (+ snum 1))) ; for increment (if (not (= pt nil))(setq nf-ns (+ numf 1))) (setq ptlist (append ptlist (list pt))) ; to stop while command ) ;progn ) ;while (princ) ) ;defun (defun c:RES () (setq namef "") (prompt "\nPrefix Text Variable Reseted") (princ) ) ;defun ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;---------- sub function for Table---------- (defun CRTable () (setq LEN (length CORDS)) ;(setq CORDS (acad_strlsort CORDS)) ;;;sorts list into order (setq CORDS (vl-sort CORDS '(lambda (x1 x2) (< (atoi x1) (atoi x2))))) ;;; sorts list into order NEW (setq CNT 0) (if (= (getvar "tilemode") 1) (setvar "tilemode" 0)) (command "pspace") (setq SP (getpoint "\nPick start point for table")) (setq ht 2.5) ;; text hieght (command "-style" "Isocp" "Isocp.ttf" 2.5 "1" 0 "n" "n") (if (not (tblsearch "layer" "Coordinate Table")) (command "-LAYER" "N" "Coordinate Table" "C" "7" "Coordinate Table" "LT" "Continuous" "Coordinate Table""LW" "0.00" "Coordinate Table" "")) (if (/= SP nil) ;;;checks for null input (progn (setq TXTX (car SP)) ;;;gets x coord of text start point (setq fx txtx) ;;; set first x value (setq TXTY (cadr SP)) ;;;gets y coord (setq fy TXTY) (setq encw 25.00) ; easting & northing Column width (setq nocw 20.00) ; number Column width (setq ten (/ encw 2)) (setq tno (+ (/ nocw 2) ten)) ;; place easting & northing text (entmake (list (cons 0 "text") (cons 1 "COORDINATES") (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list (+ TXTX 2.5) (+ TXTY (/ ht 2) (* ht 2)))) (cons 11 (list (+ TXTX 2.5) (+ TXTY (/ ht 2) (* ht 2)))) (cons 40 3.0) (cons 50 0.0) (cons 72 4) ) ) (entmake (list (cons 0 "text") (cons 1 "POINTS") (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list (- TXTX tno) TXTY)) (cons 11 (list (- TXTX tno) TXTY)) (cons 40 ht) (cons 50 0.0) (cons 72 4) ) ) (entmake (list (cons 0 "text") (cons 1 "EASTING") (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list TXTX TXTY)) (cons 11 (list TXTX TXTY)) (cons 40 ht) (cons 50 0.0) (cons 72 4) ) ) (entmake (list (cons 0 "text") (cons 1 "NORTHING") (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list (+ TXTX encw) TXTY)) (cons 11 (list (+ TXTX encw) TXTY)) (cons 40 ht) (cons 50 0.0) (cons 72 4) ) ) ;; place easting & northing horizontal table lines (entmake (list (cons 0 "line") (cons 8 "Coordinate Table") (cons 10 (list (- TXTX (+ ten nocw)) (+ TXTY ht))) (cons 11 (list (+ TXTX ten encw) (+ TXTY ht))) ) ) (entmake (list (cons 0 "line") (cons 8 "Coordinate Table") (cons 10 (list (- TXTX (+ ten nocw)) (- TXTY ht))) (cons 11 (list (+ TXTX ten encw) (- TXTY ht))) ) ) (repeat LEN (setq TXTY (- TXTY (* 2 HT))) ;;;set new y coord for text (setq SP (list TXTX TXTY)) ;;;creates code start point (setq CORD (nth CNT CORDS)) ;;;gets coord from list (setq COLEN (strlen CORD)) ; (setq COM 1 GAP 1) (while (/= COLEN COM) ; (setq COM1 (substr CORD COM 1)) ;finds ',' in strings for (if (and (= COM1 ",") (= GAP 1)) (setq S1 COM GAP 2)) ;spliting string (if (and (= COM1 ",") (= GAP 2)) (setq S2 COM)) ; (setq COM (+ COM 1)) ; ) ;while (setq CODE (substr CORD 1 (- S1 1))) ;;;strips of code (setq SON (substr CORD (+ S1 1) (- S2 S1 1))) ;;;strips of north (setq SOE (substr CORD (+ S2 1) (- COLEN S2))) ;;;strips of east (entmake (list (cons 0 "text") (cons 1 code) (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list (- TXTX tno) TXTY)) (cons 11 (list (- TXTX tno) TXTY)) (cons 40 ht) (cons 50 0.0) (cons 72 4) ) ) (entmake (list (cons 0 "text") (cons 1 soe) (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list TXTX TXTY)) (cons 11 (list TXTX TXTY)) (cons 40 ht) (cons 50 0.0) (cons 72 4) ) ) (entmake (list (cons 0 "text") (cons 1 son) (cons 7 "Isocp") (cons 8 "Coordinate Table") (cons 10 (list (+ TXTX encw) TXTY)) (cons 11 (list (+ TXTX encw) TXTY)) (cons 40 ht) (cons 50 0.0) (cons 72 4) ) ) (entmake (list (cons 0 "line") (cons 8 "Coordinate Table") (cons 10 (list (- TXTX (+ ten nocw)) (- TXTY ht))) (cons 11 (list (+ TXTX ten encw) (- TXTY ht))) ) ) ;; horizontal lines (setq hl (entlast)) ; set hl as last horizontal line (setq CNT (+ CNT 1)) ) ;repeat (setq ly (caddr (assoc 10 (entget hl)))) ;set last y value ;; place easting & northing vertical table lines (entmake (list (cons 0 "line") (cons 8 "Coordinate Table") (cons 10 (list (- fx ten) (+ fy ht))) (cons 11 (list (- fx ten) ly)) ) ) (entmake (list (cons 0 "line") (cons 8 "Coordinate Table") (cons 10 (list (+ fx ten) (+ fy ht))) (cons 11 (list (+ fx ten) ly)) ) ) (entmake (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 8 "Coordinate Table") (cons 90 4) (cons 70 1) (cons 10 (list (- fx (+ ten nocw)) (+ fy (* ht 4)))) (cons 10 (list (+ fx (+ ten encw)) (+ fy (* ht 4)))) (cons 10 (list (+ fx (+ ten encw)) ly)) (cons 10 (list (- fx (+ ten nocw)) ly)) ) ) ; inner rectangle (entmake (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 8 "Coordinate Table") (cons 90 4) (cons 70 1) (cons 10 (list (- fx (+ ten nocw 1)) (+ fy (* ht 4) 1))) (cons 10 (list (+ fx (+ ten encw 1)) (+ fy (* ht 4) 1))) (cons 10 (list (+ fx (+ ten encw 1)) (- ly 1))) (cons 10 (list (- fx (+ ten nocw 1)) (- ly 1))) ) ) ; outer rectangle (command "erase" hl "") ) ; progn ) ;if (command "redraw") (princ) ) ; defun ;;-------------Main function to make List of points----- (defun c:CRT (/ txtx txty len cord cords cnt sp ht code son soe sox soy so1 encw nocw ten tno lat hl ly fx fy) (setvar "cmdecho" 0) (setq temperr *error*) (setq *error* trap3) (setq CORDS nil LEN nil CNT 0) ;;resets coord list to nil (princ (strcat "\n ")) (initget 1 "All Select") (setq sel (strcase (getkword "\Select individual coordinate points or Select All (S or A): "))) (if (= sel "SELECT") (setq SS (ssget '((2 . "crblk")))) (setq SS (ssget "X" '((2 . "crblk"))))) (command "UCS" "WORLD") (while (/= SS nil) ;;;checks for nil selection (setq LEN (sslength SS)) (repeat LEN (setq SO0 (ssname SS CNT)) (setq CORD (cdr (assoc '10 (entget SO0)))) ;;;gets coords of point (setq SOX (rtos (car CORD) 2 3)) ;;;strips off X coord (setq SOY (rtos (cadr CORD) 2 3)) ;;;strips off Y coord (setq SO1 (entnext SO0)) ;;;gets attribute entity (setq CODE (cdr (assoc '1 (entget SO1)))) ;;;strips off point code from attribute (setq CORD (strcat CODE "," SOY "," SOX)) ;;;creates string of code,y,x (setq CORDL (list CORD)) ;;;converts into list (if (= CORDS nil) (setq CORDS CORDL) (setq CORDS (append CORDL CORDS))) ;;;starts new list or adds to old (setq CNT (+ CNT 1)) ) (setq SS nil) ;;;finishes loop ) ;while (command "UCS" "P") (if (/= (length CORDS) 0) (CRTable)) (setq *error* temperr) (prompt "\n Coordinate Table is Placed\n © Bijoy Manoharan 2011 www.cadlispandtips.com") (princ) ) ;defun ;;------------- end Main function -------------------- ;;-------------Main function to make List of points by fields and in reail table----- (defun c:FCRT (/ e n blk corlis txtx txty len cord cords cnt sp ht code son soe sox soy so1 encw nocw ten tno lat hl ly fx fy) (setvar "cmdecho" 0) (setq temperr *error*) (setq *error* trap3) (setq CORDS nil LEN nil CNT 0) ;;resets coord list to nil (princ (strcat "\n ")) (initget 1 "All Select") (setq sel (strcase (getkword "\Select individual coordinate points or Select All (S or A): "))) (if (= sel "SELECT") (setq SS (ssget '((2 . "crblk")))) (setq SS (ssget "X" '((2 . "crblk"))))) (command "UCS" "WORLD") (if (/= SS nil) (repeat (setq n (sslength ss)) (setq blk (ssname ss (setq n (- n 1)))) (setq corlis (cons (list (cdr (assoc '1 (entget (entnext blk)))) (strcat "%<\\AcObjProp Object(%<\\_ObjId " (ObjectID (vlax-ename->vla-object (entnext blk))) ">%).TextString>%") (strcat "%<\\AcObjProp Object(%<\\_ObjId " (ObjectID (vlax-ename->vla-object blk)) ">%).InsertionPoint \\f \"" "%lu2%pt1%pr3" "\">%") (strcat "%<\\AcObjProp Object(%<\\_ObjId " (ObjectID (vlax-ename->vla-object blk)) ">%).InsertionPoint \\f \"" "%lu2%pt2%pr3" "\">%") ) corlis ) ) ) ) (if (> (setq n (length corlis)) 0) (progn ;(setq n (+ n 1)) (setq corlis (vl-sort corlis '(lambda (x1 x2) (< (if (> (atoi (car x1)) 0) (atoi (car x1)) (car x2)) (if (> (atoi (car x2)) 0) (atoi (car x2)) (car x2)))))) (initget 1) (setq pt (getpoint "\nSelect point for table: ")) (foreach li corlis (if (not e) (setq e pt) (setq e (list (+ (car e) (vla-get-width tap) 3) (cadr e) (caddr e)))) (command "-TABLE" 1 3 e) (setq tap (vlax-ename->vla-object (entlast))) (vla-SetText tap 0 0 (strcat "BEND - " (nth 1 li))) (vla-SetText tap 2 0 (strcat "E=" (nth 2 li))) (vla-SetText tap 3 0 (strcat "N=" (nth 3 li))) ) ) ) (command "UCS" "P") (setq *error* temperr) (prompt "\n Coordinate Table is Placed") (princ) ) ;defun (defun ObjectID ( obj ) (eval (list 'defun 'ObjectID '( obj ) (if (and (vl-string-search "64" (getenv "PROCESSOR_ARCHITECTURE")) (vlax-method-applicable-p (vla-get-utility (acdoc)) 'getobjectidstring) ) (list 'vla-getobjectidstring (vla-get-utility (acdoc)) 'obj ':vlax-false) '(itoa (vla-get-objectid obj)) ) ) ) (ObjectID obj) ) (defun acdoc nil (eval (list 'defun 'acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (acdoc) ) ;;------------- end Main function -------------------- ATT Cordinates IN Table - CN,FCRT.LSP Drawing - Copy111.dwg
  19. Hi everyone, Setup; OS: Win 7 Pro X64 Product: AutoCAD 2015 Electrical CPU: i7 Graphics: AMD FirePro M6100 FireGL V Ram: 16GB Problem; I've created a datalink table to an Excel spreadsheet, and I'm only having issues with tables that required a break (table wrapping). Once I break the table and setup text properties; text height, alignment, headers, cell widths. Everything looks okay until I close and open the drawing. The first half of the table remembers the settings, but the second half always reverts back to .5 text height and top center alignment (headers and cell width are still in place on the 2nd part of the table) Solutions I've tried; I've tried to do the formatting before I break the table, I've tried after its broken. I right clicked on the tables and "Remove All Property Overrides" which makes the text all crazy, so I setup text properties, qsave and close. once I open the drawing text height and alignment changes again. If I try to "Remove All Property Overrides" the text doesn't change, so I think that function worked correctly. Summary; How can I get the 2nd half of the datalinked table to remember all property settings? I'm out of ideas Does anyone have some other solutions to try? Thanks for your time. -DataLinkQ
  20. hi all, i have drawings that contains stations and waterlines as polyline or spline. (in att. dwg named as ST0, ST1...ST20, and WL0 to WL8) there may be other stations or waterlines such as ST0.5, ST1.5, WL9, WL10... i need a table that shows distance of intersection points from CL. (see att. dwg) is it possible to make this table by lisp? lines.dwg
  21. Hi All, I'm very new to these so please be nice! Basically our company cuts heaps of metal panels. We draw each panel, do the cutting lists, nest and optimise them on sheets manually. I'm trying to save some time by creating a block that'll make life a bit easier. So I've currently got a block where you can input the height and width & it automatically adjusts. What I'd like to add is an atrribute? or a tag? where that little box pops up and you can input the height & width in there instead. Additionally I'd like the pop up box to include the panel # which is then shown on the panel (see drawing where I've just added in 'a1', 'a2' etc). Next step would be to include a table that collates the information from all the panels (we often do around 30 panels per order). Currently we manually input all the sizes in to excel. Just to make things more interesting we use metric autocad but are often given dimensions in imperial, so half the time is spent manually converting feet & inches into mm and then drawing the panels in mm. If there's any way to input in imperial and show both metric and imperial on the dimension line that would just be the best thing ever! I might be being a bit greedy with so many requests so if anyone could help with just one of the above it would be very much appreciated. Thankyou trial.dwg
  22. Good Afternoon, I am working on an issue at my company and I hope I can get some help. I work at a metal panel company and I was hoping that I could insert a table that will update due to panel dimensions. What I would really like to see is a table that can give me Length and Width as well as the bends associated with the panel for fastening. What would be amazing is if I could get that table to give me the aforementioned information as well as being able to account for "corner panels", etc. since that is counted as one panel in this instance. Can this all be connected to a panel number? Please let me know if this is unclear. Thank you so much!
  23. Dear all, I need support for an issue with table. I have a table composed by 70 rows and 12 columns, Rows height and columns width has been settled before as preliminary, when table being inserted in the drawing. The scope is to fit the column size to cell contents, with a fixed row height. Of course I don't know, before writing data into the table's cell, if the contents length will be higher than the columns width, so when table will be drawn and updated I would like to adapt the columns width to cell contents. I tried to apply the below code but nothing is changing, I tried after writing the cells contents and before writing the cells contents but result it's the same: if cell's contents it's higher than columns width I have the contents carriage return results. See image below. I Tried also to use the Autoscale2 method but I do not understand how to use nContent parameter, due to it's required as long type variable instead a text as table data cells required. For i = 2 To .Rows - 1 For j = 0 To .Columns - 1 Actable.SetAutoScale i, j, False 'or True Next j Next i RetVal = object.GetAutoScale2(nRow, nCol, nContent) object Type: Table The object this method applies to. nRow Access: Input-only Type: Long The row number of the cell to set. nCol Access: Input-only Type: Long The column number of the cell to set. nContent Access: Input-only Type: Long The content value for the cell. Return Value (RetVal) Type: Boolean True: AutoScale is used for the content with the index at the cell location. False: AutoScale is not used for the content with the index at the cell location.
  24. I inserted a pdf file (table) and printed it out. Now that I want to open the file again, the table is gone and its address is shown instead. What is wrong and how can I keep the table as the first time?
  25. Hello, I am trying to find a simple way to number alignment segments sequentially and numerically. an example would be changing L1, C1, L2, C2 to 1,2,3,4. I also need this information to be applied to a table and be dynamic. Any and all help is appreciated. Regards, Phil
×
×
  • Create New...