Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fields, Object, Attribute Value

50 REPLIES 50
SOLVED
Reply
Message 1 of 51
Charles_Shade
16268 Views, 50 Replies

Fields, Object, Attribute Value

In the attached I am looking to have the Fields updated by the Value in the Attribute.

All other Object choices for an Attribute will populate the Field except Value.

Limitation or am I missing something?

50 REPLIES 50
Message 21 of 51
Anonymous
in reply to: mdhutchinson

we're on 2011

 

okay...

 

1. opened new drawing

2. inserted "valuefieldtest"

3. updated value1

4. regen (nothing happened)

5. stretched the dynamic block a little from DB grip

6. regen (it worked)

 

That sucks 😞 (back to head scratching)

Message 22 of 51
mdhutchinson
in reply to: Anonymous

So... I wasn't crazy... and yes! ... it does suck.

 

Apparrently, you have to initiate some kind of edit that converts the default block to an altered block. If you do a list command on a freshly placed dynamic block...  the info comes up showing the given block name. But after the block dynamic controls have been edited... the anonymous block name is also shown.

 

I think If you was to insert the block into a file all by itself - edit the dyn control... then save it and give the file a name (obviously not the same as the block name)... then insert that exploded into a new drawing... the update should happen the very first time. This is the best solution I can come up with.

Perhaps Charles can chime in here and confirm what we've found!... or point out what we are doing wrong... (I wish) 

 

 BLOCK REFERENCE  Layer: "0"
                            Space: Model space
                   Handle = 2e18
       Block Name: "ValueFieldTest"
                at point, X=133'-8 1/2"  Y=100'-11 89/256"  Z=    0'-0"
   X scale factor: 1.00000000

 

 

 BLOCK REFERENCE  Layer: "0"
                            Space: Model space
                   Handle = 2ddd
       Block Name: "ValueFieldTest"
   Anonymous Name: "*U12"
                at point, X=133'-6 209/256"  Y=100'-11 137/256"  Z=    0'-0"
   X scale factor: 1.00000000

 

 

Message 23 of 51

Yes that is a head scratcher.

 

In the sample I posted you do have to invoke a Dynamic Property before the Field will Populate in the second position.

Setting the Vis State to Double is that change.

Never thought about that before but in your case manipulating the Stretch Action is the change.

 

This is likely a limitation of using a Field this way.

Message 24 of 51

"In the sample I posted you do have to invoke a Dynamic Property before the Field will Populate in the second position.?

Setting the Vis State to Double is that change."

 

Yes... you do have to invoke the Dyn Property before the Field will Populate.

I edited your block slightly... and set 'Double' to be current upon insert. The block still required a dynamic block change... even as simple as just clicking on a control is enough.

 

I also tested your block with RESETBLOCK command... this command returns the dyn block properties back to their defaults. If you sync up the Field attribute to a user specified value from the referenced attribute... then use RESETBLOCK on the block... a subsequent REGEN forces the Field back to the default value even though a user specified value shows in the other attribute.

 

I don't suppose there would be some dyn property nuance that you could implement that would force the block to some sort of change on insert... so that the fields would update the first time. (short of a lisp routine, or some such tool).

 

I think in my case I will consider putting an 'altered' block within another drawing file and insert it exploded... I am fairly certain this would then work as we wish it would.

 

Message 25 of 51

"This is likely a limitation of using a Field this way."

 

To quote the last part of my reply as well.

Seems to answer your question about additional programming.

No way to know for sure unless an Autodesk programmer comes along and confirms.

Message 26 of 51
mdhutchinson
in reply to: Anonymous

agreed...

I'll post back if my approach would work... 'block inserted in another dwg then inserted exploded'

Message 27 of 51
Anonymous
in reply to: mdhutchinson

i have a similar question, which might be having nearly the same answer:

i have block (a window in this case) with an attribute (the number of the window) within another block (the flat) with another attribute (the number of the flat)

i now want the windowattribute to show the usergenerated value of the flatattribute.

 

after reading this topic i would guess that it should be possible. has anybody here tried this already?

thanks for any help!

Message 28 of 51
Anonymous
in reply to: Anonymous

Does anyone know of a way to keep the attribute containing the field from being edited by a user? Everything I have tried doesn't seem to work. My vision is to have a list of Attributes that the user can fill in. These attributes would be made "invisible" then I would have multiline attributes with a field in them reference the invisible attributes. This works great using Charles' method of putting a field in the attriubte. However, I just want to see the value of the field in the block, not in the attribute editor. 

 

Thanks!

Message 29 of 51
Libbya
in reply to: Anonymous

I'd be very excited to find a way, but have not been able to.  You can check 'preset' and at least it won't ask the user to change it on insertion but that's the best I've been able to come up with.  

Message 30 of 51
KyleR13
in reply to: Charles_Shade

I am having the same issue with fields in a dynamic block.  I've performed the same steps outlined in this thread and many other thread on other forum sites with out any success.  Even after invoking some of the dynamic commands, the fields don't update.  In fact the only time the field seems to update from the source attribute is if there is a default value place in the source attribute, otherwise all I ever see is "----".  I've double checked the fieldeval setting and it is set to "31", I've tried re-syning the block through the battman command and still no luck.  It doesn't seem to matter if the field is with mtext or an attribute it doesn't want to work for me.  I've attached the file in hopes that someone can see where I am making a wrong turn.  Its a block for calling out welds in a detail.  The goal is to have a individual attribute for each of the following notes in the symbol: Near Side Size ( Bottom), Far Side Size (Top), Near Side Length-Spacing (Bottom), Far Side Length-Spacing (Top), and 3 individual attribute lines for the tail note.  The fields would pull their information from each one of these attributes when the weld symbol is reversed/mirrored so that these automatically populate or update if there were revisions made to the detail weld symbol.  Please excuse the mess of the file since it is incomplete and I still have a few additional commands/actions to place once this hurdle is passed.

 

Thanks,

 

Kyle

Message 31 of 51
Libbya
in reply to: KyleR13

It is not working because, in the field dialog window you did not check the little box in the bottom right corner that says, "Display value for block reference".  After that is done, it works fine (after a dynamic action and refresh...).

 

 

Message 32 of 51
Libbya
in reply to: Anonymous

@Disposedhero, I posted a solution for preventing user destruction of fields here:

 

http://forums.autodesk.com/t5/dynamic-blocks/how-to-prevent-users-from-destroying-fields-in-attribut...

Message 33 of 51
KyleR13
in reply to: Libbya

Libbya,

Thanks for the input. That check box is checked by default when I was originally creating the block but it wasn't working for me at first. I rechecked it and after inserting it into a test drawing, not the test block command with in Bedit, I ran the attsync command and it worked for the first time since I've been giving this task. I was just wondering if you had to run the attsync command to get it to update or if applying any one of the dynamic actions that I already have in place if it updated for you.
Thanks,

Kyle
Message 34 of 51
Libbya
in reply to: KyleR13

There is not a default for that check box.  It remembers its setting from the last time it was changed for a field that was created within a block.

 

I did not have to do anything to your block other than change the checkbox.  That said, I only tested it within the test block window which treats the block as though a new insertion (almost...).  If updating the block within a file where the block definition already exists, I imagine attsync would be required.   

Message 35 of 51
KyleR13
in reply to: Libbya

Libbya,

 

  You are correct that it uses the setting from the previous insertion, but since this was the first time that I had used any type of text fields and it was checked, I'm going to assume it is safe say that ACAD defaults to it being checked at the initial install of the program.  Regardless of that, thanks for your help in solving that problem.  The reason I asked about using the test block window is that, for me atleast, I was having some other unexplainable issues with the attributes, that I haven't been able to replicate since.  My guess is the ghost in my machine has been exorcised. 

 

  I would like to share something I hadn't quite expected though with attributes and visbilty states.  Only the attributes that are in the current visibiltiy state of the inserted block are editable.  For example you have VS1 and VS2, VS1 has attributes A, B, and C where as VS2 has attributes D, E, and F.  Upon insertion of the block, the dialog box for the attributes will only show A, B, and C if VS1 is the default view for insertion.  This came to me as a surprise since I was expecting a long list of attributes to fill out on the intial insert of the block.  It should also be noted, I think, that only the attributes in the current VS are available in the Properties Dialog Box.

 

Thanks again,

 

Kyle

Message 36 of 51
Anonymous
in reply to: Charles_Shade

 Haven't find out any solution for a trouble of mine. Even after read all topics above.

 

I have a dynamic block with an Attribute and the Mtext (or Text) with a Field inside, that points to an Attribute.Value. All of this was made up inside the Block Editor.

So this construction doesn't work at all - fields are not updates (it works only inside BEdit itself). 😞

 

In another examples I've noticed that there was another Field defifniton - it points to an Object of a Block itself and it's attribute name!

And with this conjunction the Attribute editing updates the Field as well!

 

But I can't understand HOW is it possible to insert Field in the Block Editor with pointing to the object of Block I'm editing now. I only can choose an Attribute.Value from Field Edit dialog.

And in my case I need namely the Text with a field, cause I apply an Dyn. Array parameter to it.

 

Any ideas?

Message 37 of 51
Libbya
in reply to: Anonymous

Post your block.

 

As I mentioned above, if you define an object field within block editor, there is a small check box in the bottom right that says "display value for block reference".  If that is checked, it will update with changes to the block reference.  E.g., if the object field references the value of an attribute, when the block is inserted and the attribute changed, the field will display the changed value.  

Message 38 of 51
Anonymous
in reply to: Libbya


@Libbya wrote:

Post your block.

 

As I mentioned above, if you define an object field within block editor, there is a small check box in the bottom right that says "display value for block reference".  If that is checked, it will update with changes to the block reference.  E.g., if the object field references the value of an attribute, when the block is inserted and the attribute changed, the field will display the changed value.  


In my ACAD 2016 SP1 I don't see any check box for a field definition. Neither in Bedit nor in the inserted block reference.

Attached a simplified block tryout example (have to put in ZIP cause the Forum board swears on my DWG file)

 

I still think there should be a way to point Field to a block Object.Attribute inside the block itself. But this is a some kind of a ref recursion must occur. 

Message 39 of 51
Mags_pie
in reply to: Charles_Shade

Charles,

 

I tried the method you recommended, still could not get this to work...could you please take a look up my block and help me out?

 

Thanks!

 

Maggie

Message 40 of 51
Libbya
in reply to: Mags_pie

Post the block.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services