Jump to content
ngowans8

Automatic Unique references

Recommended Posts

ngowans8

I'm currently just getting to grips with both dynamic blocks, fields and data extraction, and I was having a play trying to figure out how to do the following.

 

I want to create a dynamic block which allows me to draw a rectangle, then position it using the block base point, then stretch the rectangle to a any given size. This part is easy. Now I want to take certain measurements from that rectangle, and populate a table with that data including the addition of a quantity column showing all the blocks with identical values. Also not too challenging.

 

The next part is where I struggle however. I need to assign each row of the table with a unique reference number, and then I need to take the data out of this reference number column and show it on the rectangle block in the form of a label.

 

Alternatively, (but with the same outcome) I need to create a "reference" attribute which compares certain values of the block to other variations of the same block, and then either, applies the same reference as any matching blocks, or gives it a new reference if there are no blocks with identical values.

 

 

Does anyone have any ideas how this could be accomplished? It would save me weeks of my life. FYI I'm using Acad2017

Share this post


Link to post
Share on other sites
Dadgad

Welcome to CADTutor ngowans8. :)

 

Check out Lee Mac's incredible selection of lisps on his site, dig deep, as you will be well rewarded.

http://www.lee-mac.com/programs.html#general

 

Lee is the man!

Thanks Lee! :beer:

Share this post


Link to post
Share on other sites
BIGAL

Have you looked at Xdata you can add a "id" to say your rectangle then retrieve it later. The other may be to make a block 1x1 and use scale to set the x & y values you can have a atribute but its set to invisible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×