Attribute value as fields in dynamic block

Attribute value as fields in dynamic block

leothebuilder
Advisor Advisor
6,243 Views
16 Replies
Message 1 of 17

Attribute value as fields in dynamic block

leothebuilder
Advisor
Advisor

I am trying to create a matchline that has an attribute for the drawing sheet number.

I tried to insert a field with the attribute value which would array along the length of the matchline as it is being stretched.

 

The problem is that the fields will not update as long as they are within the dynamic block.

Is there a workaround for this?

0 Likes
Accepted solutions (1)
6,244 Views
16 Replies
Replies (16)
Message 2 of 17

ojuris
Advisor
Advisor
Accepted solution

hi!

 

there is a problem with update text (field is defined inside block editor) with value of attribute (value defined outside of block editor)

I add file, but if you copy block in your drawing - all texts will change ar 1st block attribute

 

https://dl.dropboxusercontent.com/u/401581/Matchline%20dynamic%20block-1.dwg

Message 3 of 17

leothebuilder
Advisor
Advisor

Thank you....that worked.

 

I am just curious how you got it to work, can you explain.

 

Thanks

0 Likes
Message 4 of 17

ojuris
Advisor
Advisor
  1. add attribute in your block (after all can delete)
  2. gou out of block editor mode
  3. add to new attribute field (value of the other attribute) and copy Field expression (look at picture)
  4. go into block editor mode and in Text copy this Field expression
  5. delete unnecessary attribute
  6. Screenshot_1.png
0 Likes
Message 5 of 17

leothebuilder
Advisor
Advisor

Got it...thanks again.

0 Likes
Message 6 of 17

leothebuilder
Advisor
Advisor

There's just one flaw I just discovered.

 

If I copy the block in the same file and change the attribute of the copy, it still displays the value of the attribute of the original block.

 

E.g. the fields in the copied block displays the value of the original attribute.

0 Likes
Message 7 of 17

ojuris
Advisor
Advisor

I wrote that in my 1st post  🙂

0 Likes
Message 8 of 17

leothebuilder
Advisor
Advisor

Sorry...yes, you did mention that. No workaround I guess...

0 Likes
Message 9 of 17

ojuris
Advisor
Advisor

are you going there to write something fixed or every time something completely different?

0 Likes
Message 10 of 17

Libbya
Mentor
Mentor

I do not know of any way to have a 'preset' field that can be both arrayed and user-edited.  A way may exist, but I've looked and come up dry.

 

I imagine your matchline is going to be used on 'paper' and so there is a practical limit to the length.  If so, then the 'easy' solution is to use visibility states, attributes and a double lookup to simulate the array.  I'd also always want the text at each end of the line and then evenly spaced between as new ones were added.  See attached.

0 Likes
Message 11 of 17

leothebuilder
Advisor
Advisor

I probably will have several match lines in model space to separate clipped xrefs.

One workaround I have is to make 5 or 6 separate dynamic blocks.

0 Likes
Message 12 of 17

leothebuilder
Advisor
Advisor

Your solution is nice and clean. Thanks.

 

I do normally use these in model space.......with several clipped xrefs.

 

0 Likes
Message 13 of 17

Libbya
Mentor
Mentor

When I said 'paper' I was not specifically talking about whether your drafting technique was to use the block in model vs. paper space.  Instead I was saying that there is a practical limit to the number of necessary occurrences of the text: you don't need an infinite array so the visibility states/lookups will work fine.  There's no problem using it in model or paper space.  If the block is used on architectural drawings, the 3/32" text height is appropriately readable, but much smaller than that would not be.  On Arch E, if you are using that block with text height of 3/32, the # of occurrences of the text if diagonal on the page and spaced at 5" apart would be a total of 12 (hypoteneuse of 55").  If you wanted more occurrences than the 5 I supplied, you could add the appropriate visibility states and lookup values.   

0 Likes
Message 14 of 17

leothebuilder
Advisor
Advisor

Got it....thanks

0 Likes
Message 15 of 17

marcosmendez
Enthusiast
Enthusiast

I'm using this example to crate a scalebar.  How did you get the SHEETNO attribute created?

 

I am using the ATTDEF or Attribute definition button.  I don't know how to add an attribute like the SHEETNO.

0 Likes
Message 16 of 17

jarredmonday
Collaborator
Collaborator

@marcosmendez If you zoom in real close to 0,0 there is an attribute with its TAG SHEETNO and its value is A100. It is really small and hidden behind the line. 

 

To answer your question...you'll make another attribute like you normally would. 

Please mark Accept as Solution if your question is answered. Kudos gladly accepted. ⇘
Message 17 of 17

marcosmendez
Enthusiast
Enthusiast

I created something for a scalebar, and it works, but when I insert it into another drawing, I have to open it in block editor, then save the block, but it works.

0 Likes