AutoCAD 2010/2011/2012

Reply
Member
rayabnett
Posts: 4
Registered: ‎02-16-2010
Message 1 of 8 (3,038 Views)

Dynamic blocks with text increments

3038 Views, 7 Replies
12-13-2011 04:45 AM

Good afternoon all,

 

I was wondering if someone out there might have an answer to my question... which has been annoying me for a while now...

 

Is there anyway to have a dynamic block which utilises a similar function to TCOUNT. I am doing drawings for solar panel installations and have set up a dynamic block for our different panels that we use, which i have used xy paramater with the array action to make life simple when inserting panels onto a drawing... however we number these panels 1 to ~ ... we could have 3 on one roof but we could also have over 100... is there any way to have the dynamic block auto increment the text automatically? At the moment i use the block to show 20 panels then i explode and use the tcount command to increment the text in selection order. 

 

Or... another thought does anyone know how i could go about doing lets say a data entry for example insert block-> Dialogue for amount of panels / amount of panels in a row or column? And after selecting that data the block will automatically have numbers 1-x...

 

I have attached a sample block so you can try and get an understanding of what im after. Any help would be appreciated.

 

Cheers!

 

Ray.

Valued Mentor
gjrcmb
Posts: 326
Registered: ‎06-21-2011
Message 2 of 8 (2,973 Views)

Re: Dynamic blocks with text increments

12-25-2011 10:37 PM in reply to: rayabnett

My experience with Dynamic Blocks is pretty limited but I did attempt to do what you are describing by using attributes and/or fields.  However, my findings are that it does not seem to be possible to automatically increment numbering in the different panels within the dynamic block.  I believe that this is the inherent in the way arrays and dynamic blocks work, although the new associative array in 2012 does allow you to replace items in the array with different items.  

So in my opinion you may just need to rely on numbering the panels outside of the dynamic array.  I looked at the TCOUNT express tool and it does provide some good functionality, but it seems to have some shortcomings when it comes to specifying how the text entities are being numbered.  With that in mind I put together an AutoLisp application that essentially combines creating a rectangular array of text entities and then substitutes the text with numbers.  There seems to be greater control over how the text entities are numbered unless you are trying to number in some unusual non-rectangular pattern.  The application also provides the added functionality of using decimal numbers, which I credit that idea to Lee Mac who is a frequent contributor on this forum.

So try modifying a copy of your dynamic block to remove the text component, and then use the attached NumArray.lsp application.  Open the lisp file in Notepad to read more about it and the features.  It is also helpful to set your Object Snap setting to Midpoint, Extension, and Apparent Intersection along with turning on the Object Snap Tracking, so that you can snap to a panel midpoint intersection when choosing the start and end points for the number array.

The functionality of the application could certainly be modified or expanded to replicate an array of panels (or the block of your choice) in addition to the numbering.  However, I think the fuctionality the application, in addition to your dyanmic array is adequate and perhaps less complicated.

*Expert Elite*
ToanDN
Posts: 1,878
Registered: ‎09-26-2006
Message 3 of 8 (2,946 Views)

Re: Dynamic blocks with text increments

12-27-2011 09:29 AM in reply to: gjrcmb

The LISP is very welldone.  Thanks for sharing.

Valued Mentor
gjrcmb
Posts: 326
Registered: ‎06-21-2011
Message 4 of 8 (2,926 Views)

Re: Dynamic blocks with text increments

12-28-2011 10:21 AM in reply to: ToanDN

Thanks.  You're welcome.

 

You may also want to check a couple of programs which Lee Mac created that deal with incremental numbering:

 

http://lee-mac.com/incrementalarray.html

 

http://lee-mac.com/numinc.html

 

Both programs can be used to increment a number within a block that includes an attribute definition, which is applicable to the original post on this topic, as well as other features.  I have only briefly checked out these programs, but they certainly show that there are all sorts of possibilities or functionality that can be created within a lisp program.

Member
rayabnett
Posts: 4
Registered: ‎02-16-2010
Message 5 of 8 (2,893 Views)

Re: Dynamic blocks with text increments

01-03-2012 12:39 AM in reply to: rayabnett

Many thanks for sharing those Gavin, i'll give them a try. New start to the year and a new start at menu making :smileyhappy:.

 

Happy New Year to you all. Here is hoping its a good one!

 

Cheers!

 

Ray.

Valued Mentor
gjrcmb
Posts: 326
Registered: ‎06-21-2011
Message 6 of 8 (2,875 Views)

Re: Dynamic blocks with text increments

01-03-2012 10:55 AM in reply to: rayabnett

You're welcome.  Happy New Year to you as well.

Active Member
mthorne
Posts: 9
Registered: ‎10-20-2008
Message 7 of 8 (2,775 Views)

Re: Dynamic blocks with text increments

03-05-2012 10:26 AM in reply to: rayabnett

I just found out a good way of incrementing text and having it be dynamic with a table.  Use a table and insert a formula in one of the cells with an expression that references another cell with modifications (ex =(A10+2)).  This cell can be copied within the table similar to excel.

*Expert Elite*
3wood
Posts: 1,059
Registered: ‎03-25-2009
Message 8 of 8 (2,762 Views)

Re: Dynamic blocks with text increments

03-06-2012 01:46 AM in reply to: rayabnett

Hi Ray,

 

I am sure you have got the updated ALTEXT.vlx, I hope it works well for you.

 

3wood

CAD KITS

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.