Jump to content

Need help with slight modification in the Block count LISP.


Recommended Posts

Posted

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
 

Posted (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 by BIGAL
Posted

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.

  • 1 month later...
Posted

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

  • 5 years later...
Posted

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!

Posted

Looks like it, rerun the LISP and replace the table - a lot more work to create a table I think that updates automatically

Posted

So I thought. Thanks for the reply Steven P

Posted

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.

  • Like 1
  • Thanks 1

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...