AutoCAD 2013/2014 DWG Format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
displaying the number of the entry block
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: displaying the number of the entry block
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You could do this by creating an AutoLISP variable that stores the number of blocks. Your field could reference the variable.
(setq blknm (getstring "\nEnter Block Name: "))
(setq ss (ssget "x" (list (cons 0 "INSERT")(cons 2 Blknm))))
(setq sslen (sslength ss))
Have the field reference the variable sslen. This will not update automatically when additional copies of the block are inserted. You would either have to run it manually or put it in acaddoc.lsp so it loads with each drawing you open.
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Re: displaying the number of the entry block
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
i created file %name%.lsp
with code
"(setq blknm (getstring "\nEnter Block Name: "))
(setq ss (ssget "x" (list (cons 0 "INSERT")(cons 2 Blknm))))
(setq sslen (sslength ss))
"
next i used command appload for load this file.
and now i have lispVariable only blknm.
Re: displaying the number of the entry block
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You should also have SSLEN. I have attached a lisp file that works correclty.
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Re: displaying the number of the entry block
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
If you can't or don't want to use lisp, another option would be to create a DataExtraction table. The Quantity cell will update (semi) automatically like a field.
R.K. McSwain
CADpanacea.com | twitter | Cadalyst Tips
