Jump to content

Need help with slight modification in the Block count LISP.


AbdRF

Recommended Posts

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
 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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...