Hi there,
I have been trying this a while but how do you have one attribute reference the value in another attribute of a block.
I am talking about one block with two attributes: DESC1 and DESC2
DESC2 is always going to show whatever DESC1 is, so DESC1 is the one that I edit at the drawing level on this block and DESC2 will update accordingly.
I have been searching around and some people say you can but some say you can't unless you add a dymanic block parameter in.
what I have been doing is in block editor:
For DESC2 under Default: Insert Field->Object (Select DESC1)>Value(No format)
But after I save the block, insert the block at the drawing level, change the DESC1 value, my DESC2 is "----"
Thank you,
Ken
Solved! Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
Hi @yan_ken,
I am a little confused on why you would need this kind of function. At any rate, in a normal block I have never been able to get this to work as the first field is assigned the value at the time of creation and never gets updated. Is there a reason not to just place a field outside of the block that captures the appropriate attribute value?
Please select the Accept as Solution button if my post solves your issue or answers your question.
You can use a FIELD in the second attribute which references the first attribute in the block
Hi @murray-clack,
This doesn't work for me. Once it has the value of the first attribute it will not adjust even with a Regen or Regenall.
If I keep the 2nd Field outside of the block then yes I can select the block and then the Attribute whose value I want to duplicate. I think the OP wants the attributes in the same block.
Let me know if I am misunderstanding your suggestion.
I understand that block to block attribute reference is not an issue.
The issue is whether I can reference attribute within a block.
Thanks
Hi @yan_ken,
This is a new trick for me and I think it is pretty cool. Congrats to @ВeekeeCZ and @murray-clack
I am still not sure why I would ever need this but it is very slick.
I made a Screencast demonstrating what they suggested:
Create two normal attributes, and then make them into a block. Once this block is inserted in the drawing, replace one of the attributes with a field pointing to the Object:BLock - with the attribute name you want to duplicate.
Thanks for the KUDOS!
I can see it being used in a dual section arrow scenario. Let's say you had a dynamic block with TWO section arrows, and obviously they would have the same value (e.g. "/A\ /A\"), so instead of having to enter the same value twice, you'd just have to do it once.
It's a tiny time saver, but still a time saver.
Another idea could be for title-blocks where one attribute could be for a sheet number, and that attribute could be used for another attribute within a sheet range
example:
Drawing 1
(Sheet 1 of 10)
where the value "1" only has to be entered ONCE
Hi @murray-clack,
Ok - Ok
I'm in!
Thanks John for your effort in showing me that.
I agree that is one method, however this need to be done after the block has been created.
The vision I have is that the field reference is already built in so we do not need to insert field upon block insertion.
Hi @yan_ken,
I haven't explored all the possibilities but a copy paste from drawing to drawing works with this method. It could also be part of a template to get it into a drawing.
And the other cool part is that you insert the field once, and then simply copy the block over and over again within the drawing and the field code retains within each copied block. All you have to do next - which would have to do anyway - is modify each DESC1 value for each individual block
Hi @yan_ken,
I am checking back to see if my post or others helped you with your problem. Randall indicates in Post 9 that his method allows you to insert the block too.
Please add a post with how you decide to proceed and your results so other Community members may benefit.
Please hit the Accept as Solution button if a post or posts solves your issue or answers your question.
Thanks Randall. I think the dynamic feature has something to do with making it work. I'll look into your dwg attachment abit more. This is definitely promising!
Nice touch!
It took me a little while to figure this out! It must be a dynamic block!
When you insert a block into a drawing and don't change any of dynamic feature (= its block reference), then it does not work. But if you change any dynamic feature, then the block became an anonymous (= block definition) - and here we go, attributes works!
so what are the steps to create such reference using dynamic parameters? Am I just going select one of any of the dynamic parameter sets? to keep it simple, select Point Move?
1) Add Attribute 1 (Source)
2) Add Attribute 2 (Default Field referencing Attribute 1 Object Value)
3) Add a dynamic parameter set
Please correct me if I'm wrong.
Thanks
Can't find what you're looking for? Ask the community or share your knowledge.