AbdRF Posted April 22, 2019 Posted April 22, 2019 Hi all, I am using wonderful block count lisp by lee-mac for different drawings. But the size of the output table (block count table) formed in the AutoCAD is fixed and there is no user control to assign a custom size to the table formed. It is very small and each time I have to scale it manually. Can someone help with modifying this lisp so that it asks the user to specify the custom size of the table by dragging with a mouse on the screen (indicating the height of the table)? Below attached is the lisp. Any help will be appreciated. CountV1-5.lsp Quote
BIGAL Posted April 22, 2019 Posted April 22, 2019 (edited) I did not delve to deep but it looks like it uses "current table style", have you tried setting (setvar 'ctablestyle "your table style") before running. The style can have different heights etc. I am sure Lee will comment if I am wrong. (vla-gettextheight is read from current table style so you could overwrite (setq hgt with your value and see what happens look in code. Edited April 22, 2019 by BIGAL Quote
Lee Mac Posted April 27, 2019 Posted April 27, 2019 Al is correct - the size & appearance of the resulting table generated by this program is dependent on the active Table Style: configuring the Table Style appropriately (namely, the text height associated with the Text Style assigned to each table row type) should yield the desired result, with no modification to the code required. Quote
lee50310 Posted June 21, 2019 Posted June 21, 2019 Hello: Your program must create a new table style, create a table name in this table style, set the table direction title, file header, data column alignment And text style, word height ...... ・When you set the table style, insert the form, he will apply this form style There are two ways to set the table style. 1. Find the format (o) in your autocad window. There are tabular styles (B), set here. If you want to know more clearly, you can enter "AUC CAD SET TABLE STYLE" on YouTube and have a good teaching video. The form you insert will become very small, just set the text height of the table style (title, header, data column) in cad to a little larger. 2. Set by program, lisp create a new table style, can be found here Https://hyperpics.blogs.com/beyond_the_ui/2012/07/creating-a-table-style-with-autolisp-and-the-activex-api.html I have combined this file and tested it successfully. CountV1-5_ok.lsp Quote
Mario Sa Posted October 15 Posted October 15 Hi everybody, I recently downloaded this lisp but I can’t find where to refresh the output table. Do I have to rerun the lisp command every time I change any block quantity in the drawing? thanks in advance! Quote
Steven P Posted October 15 Posted October 15 Looks like it, rerun the LISP and replace the table - a lot more work to create a table I think that updates automatically Quote
BIGAL Posted October 15 Posted October 15 A big hint. With real big table creation you sit there and watch the wheels turning but if you set (vla-put-regeneratetablesuppressed obj :vlax-true) the table will be made in like a second or 2 for say 500 rows. You need to set the value to false to see result. So making a new table is possible. 1 1 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.