Link an attribute to the dimension of a dynamic block

Link an attribute to the dimension of a dynamic block

wai1954
Advocate Advocate
6,090 Views
8 Replies
Message 1 of 9

Link an attribute to the dimension of a dynamic block

wai1954
Advocate
Advocate

G'day,

 

I am doing some customisation for a client and am trying to have an attribute that is linked to a dimension of a dynamic block.

 

As an example, I have a wall panel (panel form sheds) that has a standardised height and width. These panels are dynamic blocks that allow me to stretch them in height and width. Depending on customer needs, these panels can be shortened, and at the moment I have to manually edit the attribute to reflect the new width. I would like the attribute to automatically update with the new value.

 

The purpose of this exercise is to run the ATTEXT command and get a full listing of the panels required, and having to manually edit them with the risk of a typo.

 

I am using AutoCAD 2016 and will be upgrading early in the new year.

 

Thanks in advance.

wai1954 (Ian A. White)
0 Likes
Accepted solutions (2)
6,091 Views
8 Replies
Replies (8)
Message 2 of 9

Libbya
Mentor
Mentor

You can use fields within the attributes.  Blockplaceholder fields that reference the specific parameters work really well.  If you want a step-by-step screencast of the process then post the block.

 

You might want to look into DATAEXTRACTION.  It works really well for getting a table of values in the manner you describe.  

0 Likes
Message 3 of 9

vinodkl
Mentor
Mentor

The following screencast shows an example on how you can link the attribute with parameter value to update the attribute automatically.

 

 

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
Message 4 of 9

wai1954
Advocate
Advocate

First thanks for the tips. It does give me some very useful information.

I've attached s very simple block I have done to illustrate what I am trying to do.

 

When you use the block, the attribute that has the tag "PANEL_CODE" contains the manufacturing panel code of ND-D-1270-3600-90. ND is the type of structure, D is for Deck, 1270 in the width, 3600 is the length, and 90 is the material size.

 

This information is then extracted from the drawing using the ATTEXT command.

 

Because these decking panels can vary in size, you will see there is a corner dynamic grip that lets you stretch it in both length and width. When this is done, I am trying to see if the PANEL_CODE can automatically change to match whatever the new length and width is so that when the ATTEXT command is next run the extracted data will reflect the new length and width without the operator having to enter the new dimensions in as too many mistakes happen and material has to be thrown away or re-worked where possible.

 

The panel list is not accessed by CAD. It is a text file that is currently prepared manually and fed into the manufacturing software.

 

Thanks for any help.

wai1954 (Ian A. White)
0 Likes
Message 5 of 9

Libbya
Mentor
Mentor
Accepted solution

Here's a screencast showing how to place the fields within the panel_code attribute value.  I checked the ATTEXT output file and it does show the correct attribute value but you MUST do a REGEN before running the ATTEXT command if you have made changes to the dimensions.  Otherwise, the field will not update and the ATTEXT file will contain the prior value of the dimensions.  I would recommend creating a simple lisp to define a new command that runs REGEN automatically before running the ATTEXT command just to eliminate that possible error.  Hope that all makes sense. 

Message 6 of 9

wai1954
Advocate
Advocate

Thanks a lot for that. I am going to have to have a few looks at it to follow it all.

 

Is there any way to save the screencast. When I go full screen I just get a black screen.

wai1954 (Ian A. White)
0 Likes
Message 7 of 9

vinodkl
Mentor
Mentor
Accepted solution

Hi,

Try using a different browser like IE and see if it still display black screen when you make it full screen.

And you cannot download the screencast posted by others.

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 8 of 9

wai1954
Advocate
Advocate

Again, thanks.

 

My reason for asking about downloading the screencast was because I had difficulty following things as I use the grey screen theme, and my menus and palettes are in different areas.

 

Anyhow, I managed to follow the instructions and all is well.

 

Rather than create a lisp routine, I modified one of my reactors as revision control was causing issues as if just a data extraction was needed, the drawing was flagged as modified, and people were saving drawings unnecessarily and the saved date and time on drawings did not match what clients had on drawings they had signed off.

 

The reactor monitors ATTEXT and -ATTEXT commands and if started does a (acad-push-dbmod), then uses VLA-REGEN which updates the attributes and then a (acad-pop-dbmod) just before exiting.

 

I am doing some testing, but will post when ready.

wai1954 (Ian A. White)
0 Likes
Message 9 of 9

Libbya
Mentor
Mentor

I'm not sure if you noticed, but along with making it fullscreen you can also play the screencast at 1/2 speed.   

0 Likes