Jump to content

Using a Field as an Attribute in a Dynamic Block


Dave-CSMW

Recommended Posts

Ok, I will try and keep this as simple and straight forward as I can.

 

I want take a block that is nothing but a rectangle and add stretch actions to the length and width. I then want to add an attributes tag to the block to define the length and width. I want the value of the attribute to be a field that is dynamically updated based on the strecth parameters. So if I stretch the length from 12 to 24 the attribute for length would change from 12 to 24.

 

I know how to do all the dynamic block stuff, I know how to use fields and attributes, but I can't figuer out how to make an attributes value update based on dynamic parameters/actions within a block.

 

TIA for any help!

Link to comment
Share on other sites

I have enclosed a sample block that updates the value based on the distance property of the "distance" and "distance1" parameter.

 

In the attribute definition value field, I right clicked and selected Insert field. The I made the following changes to the field object.

 

Field Category: Objects

Field Name: Object

Select the Linear parameter

Select the Property: Distance.

 

Save the block and Insert it.

 

Remember to type REGEN to regen the drawing after you stretch the object.

 

 

 

http://www.occc.edu/jhelton/dblock.dwg

Link to comment
Share on other sites

  • 3 weeks later...

What you may not know is that a field can reference a parameter in a dynamic block just as it can reference an attribute.

 

Before you start, you may wish to rename your distance parameters in the block definition so they are easy to find in the field menu. (suggestion: width, height)

 

type ATT

 

to the right of VALUE hit the INSERT FIELD button

 

under FIELD CATEGORY choose OBJECTS

 

use select objects button and pick block you wish to reference

 

the name of your parameters should be in the list. Simply pick which one you wish to use and update the rest of attribute.

 

repeat for multiple attributes.

 

Once you've created a block using your new attributes, the fields will automatically update after a regen should you adjust the size of the block.

 

I hope that helps.

Link to comment
Share on other sites

  • 2 years later...

I am not super familiar with dynamic blocks, but I know what I need to do could only be possible through their concept. This idea of an automatically adjusting an object and its readout like this could really come in handy.

 

Do you feel that you could make a block, say a donut, that when put at a certain location in model space could automatically fill in a table in paper space based on it x,y coordinate? If so, would you have to hyperlink each block to each field in the table.

 

Thanks for any help you can offer.

Link to comment
Share on other sites

  • 7 years later...

Hi all ... I am having the same issue but I do not know if I need to open up a new Thread or if I can ask it in this one ? It is related to the same thing

Link to comment
Share on other sites

  • 5 months later...
I have enclosed a sample block that updates the value based on the distance property of the "distance" and "distance1" parameter.

 

In the attribute definition value field, I right clicked and selected Insert field. The I made the following changes to the field object.

 

Field Category: Objects

Field Name: Object

Select the Linear parameter

Select the Property: Distance.

 

Save the block and Insert it.

 

Remember to type REGEN to regen the drawing after you stretch the object.

 

 

 

http://www.occc.edu/jhelton/dblock.dwg

 

 

Thanks Prof, I have been dabbling with this one by stretching an object and using it's length but when I changed visibility states the object length value was lost to complication. Your explanation is one that I would not have recognized without reading your post. Thanks again.

Link to comment
Share on other sites

Ok, I will try and keep this as simple and straight forward as I can.

 

I want take a block that is nothing but a rectangle and add stretch actions to the length and width. I then want to add an attributes tag to the block to define the length and width. I want the value of the attribute to be a field that is dynamically updated based on the strecth parameters. So if I stretch the length from 12 to 24 the attribute for length would change from 12 to 24.

 

I know how to do all the dynamic block stuff, I know how to use fields and attributes, but I can't figuer out how to make an attributes value update based on dynamic parameters/actions within a block.

 

TIA for any help!

 

 

You might use nomenclature in the attribute tag that helps you to remember how you defined the field I found I could use object: select a line of the rectangle/length and get a returned value but the point is define a couple of attributes and select the field by more than one method to see what you get....

 

Best of luck

Link to comment
Share on other sites

I have enclosed a sample block that updates the value based on the distance property of the "distance" and "distance1" parameter.

 

In the attribute definition value field, I right clicked and selected Insert field. The I made the following changes to the field object.

 

Field Category: Objects

Field Name: Object

Select the Linear parameter

Select the Property: Distance.

 

Save the block and Insert it.

 

Remember to type REGEN to regen the drawing after you stretch the object.

 

 

 

http://www.occc.edu/jhelton/dblock.dwg

Wow small world I was in your class way back in 1999.

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