itacad Posted June 24, 2023 Posted June 24, 2023 Hi, I want to have an excel table in autocad, simply as a basis for texts to be copied, no links or complicated things. I prepared the table in excel, I selected the area that interests me and copied it to the windows clipboard, then in autocad I chose paste special, autocad entity and an autocad table is created with the values taken from excel. I would like to arrange it graphically, it is enough for me to understand how to do two operations: 1) how do you make all text (and borders) white? in the table they are created with color 0,0,0 which is a black 2) how do you fit all the rows and columns to the length of the text to avoid capping? in the initial excel table the rows and columns are already adapted to the texts, but in the transition to autocad the rows and columns have different dimensions Thank you in advance Quote
BIGAL Posted June 25, 2023 Posted June 25, 2023 Need a custom get from Excel, what you ask for can be done by editing the table after its made. In the case of the column width being slightly bigger than the text , Need to get all text in column find the text with the most characters and use a fuzz factor for width. eg textheight * 0.75* (strlen str). For me read the excel and make a Acad Table. This is text example for color, similar for line work. (setq colObj (vlax-create-object (strcat "AutoCAD.AcCmColor." (substr (getvar "ACADVER") 1 2)))) (vla-setRGB colObj 89 176 79) (vla-setcolor cuStobj acTitleRow colObj) (vla-setRGB colObj 255 0 0) (vla-setcolor cuStobj acHEADERRow colObj) Quote
itacad Posted June 26, 2023 Author Posted June 26, 2023 thanks for the reply, meanwhile, for the text color, I googled and found the references for the useful lisp StripMtext v5-0b which I found here: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stripmtext-v5-0-lisp-routine/td-p/2673838 now I have to figure out if you can adjust row and column dimensions as easily as in excel greetings 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.