Dynamic block Field value getting lost during Block update

Dynamic block Field value getting lost during Block update

marimuthu_madasamy
Explorer Explorer
1,118 Views
9 Replies
Message 1 of 10

Dynamic block Field value getting lost during Block update

marimuthu_madasamy
Explorer
Explorer

Hi every one, 

I have created a dynamic block with Field referencing, my requirement is i want the Same Attribute values repeated in one more attribute, so i have referenced the first attribute values with the Second one ,so when i give value in the first attribute it is updated in the second one as well. the issue i am facing is in this dynamic block when ever i update the block for any minor changes, the Field expression Objid is getting changed, and after making modification when i redefine the block in the drawing i used , my link between the Field is getting lost, and getting error message attached below,

Error.PNG

 Obj Id changes

Before and After block update.PNG

 old and updated block next to each other

old and new block.PNG

in short i want to update all my blocks in the drawing without losing the referenced link between attribute after updating my dynamic block.

 

Any one Please help to resolve the issue, i am not the expert in dynamic block.. so please help me to understand and resolve this issue.

 

 

0 Likes
1,119 Views
9 Replies
Replies (9)
Message 2 of 10

Libbya
Mentor
Mentor

If there are not custom values added to any of the attributes, then add the new attribute, make an edit of the existing attributes, then do a regen for the block definition and the fields should return.  You might also consider adding a user parameter to house the desired value and then add a blockplaceholder field referencing that user parameter within each attribute.  Blockplaceholder fields do not tend to lose their connection like object fields.  

0 Likes
Message 3 of 10

marimuthu_madasamy
Explorer
Explorer

Hi @Libbya ,

 

Thank you so much for your quick response, as i told i am not a expert in dynamic block i am not able to understand fully your response, i have made a screen recording of my dynamic block and how i referenced the block and then i made change and undo it and redefine the block and the link is lost, so have a look and please help me to understand what i could have done better to resolve this issue. Please help me i understand how to use my case in user defined blockplaceholder instead of referencing. i have attached my Block as well.

 

 

0 Likes
Message 4 of 10

Libbya
Mentor
Mentor

Thank you for posting the video and the block file.

 

Attributes will maintain their value through block definition changes unless there is a change to the attribute definition that would reset the attribute to its default state.  Knowing that is useful both so that you can maintain values or so you can force the resetting of values depending on which behavior is desired.  When making edits to the block definition you want to maintain the attribute values of the "FROM_CABLE_NUMBER" attribute so do NOT edit its properties.  In your case, you want to reset the value of the "TO_CABLE_NUMBER" attributes that are in the existing insertions.  This is easily accomplished by going into block editor and making an edit to the "TO_CABLE_NUMBER" attribute so that the existing insertions reset those attributes back to the default value (which will now contain the updated field).  Moving the attribute within block editor will not accomplish that task.  Instead, select the attribute, go to properties and change the Tag property.  Save the block, go to model space, and run ATTSYNC on the block.  If desired, you can then go back to block editor and edit the Tag back to what it was before, save, close, run ATTSYNC again.   

0 Likes
Message 5 of 10

marimuthu_madasamy
Explorer
Explorer

Hi @Libbya 

 

Thanks once again for your response,

i understood your response now clearly, for making modification on already inserted block i would use block editor, Sorry for the misunderstanding  in the video moving attribute action is just an example i thought of showing a change in dynamic block.. what i am trying to do , i want to keep a master block and make changes only to master block and insert it on multiple drawing whenever needed.. if i edit the block in every drawing i am unable to maintain a master block. so what i did is made the changes to master block and updating in all the drawing that i used the block using redefining, is there is better way to do implement my master block concept without losing the field value in the already inserted blocks. the example i have used only two attributes. in the master block i keep on adding attributes and action and parameters etc, whenever i need extra attribute. so every time i make changes to master block i want it to be reflected in already inserted block..that is where i facing this field referencing issue..is there a better way to do this..please let me know..

0 Likes
Message 6 of 10

Libbya
Mentor
Mentor

Same concept.  In that case, then within your master block definition, make a change to the Tag property of each previously existing attribute that contains a field.  When you redefine the block the existing insertions will adopt the default value of the attributes that have had their Tag properties updated in the master block.  In any case, if you edit any attributes, you will need to run ATTSYNC to update them.

0 Likes
Message 7 of 10

Libbya
Mentor
Mentor

I would also again recommend that you consider a user parameter for containing the value you want repeated and then using a blockplaceholder field referencing the user parameter for repeating the value (rather than using object fields referencing attribute values).  You would then edit the user parameter value in properties rather than editing the value of the 'from' attribute.  The blockplaceholder fields maintain their field values through updates better than object fields.  

0 Likes
Message 8 of 10

marimuthu_madasamy
Explorer
Explorer

Hi @Libbya 

 

Thanks once again for your reply,

 

is it possible to show a Video / screenshot representation of your explanation ,  sorry i could not able understand Autocad Technical Terms like Tag property ,if possible using my test Block.

0 Likes
Message 9 of 10

marimuthu_madasamy
Explorer
Explorer

Hi @Libbya 

 

Sorry for asking again. i am trying user parameter as well. it is new to me.. if possible can you show a demo or link to  a demo, any thing would be really helpful..

0 Likes
Message 10 of 10

Libbya
Mentor
Mentor

Properties of an item can be seen on the properties palette.  Select the attribute and go to the properties palette to find the Tag property.

 

See AutoCAD help for more detailed information on user parameters.  IMO the easiest way to create and modify them is through the Parameters Manager.  

0 Likes