TheSwamp
CAD Forums => CAD General => Dynamic Blocks => Topic started by: ahankhah on February 24, 2021, 09:10:21 AM
-
Hi all,
I defined a dynamic block containing some user defined parameters.
When iserting attributes, I define one of parameters as a field, but after closing the Block Editor and inserting the block, it show just the word "UserVariable" instead of real value of the parameter.
Does anyone know what is going wrong and where I am making a mistake?
I appreciate any help.
-
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
-
It should work if it was created in that drawing.
If an object and a text or attribute with a field referencing it were inserted into another drawing the field's link would be broken since the object and it's ID would be different in the new drawing.
If you were to make multiple copies of an object with a field referencing it all the fields would reference the original object and it that object was deleted it would break the reference to all the copied fields.
-
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
Daniel, thank you for your reply. I will send the file as soon as possible, when I am at work. (In my country, Iran Friday is weekend.)
-
It should work if it was created in that drawing.
If an object and a text or attribute with a field referencing it were inserted into another drawing the field's link would be broken since the object and it's ID would be different in the new drawing.
If you were to make multiple copies of an object with a field referencing it all the fields would reference the original object and it that object was deleted it would break the reference to all the copied fields.
tombu, I defined the block whithin this drawing. But I will do all the job in a new bare drawing to see if it will be well done or not.
-
Oooh, I didn't know that!
So do you have Friday/Saturday off work and work Sunday-Thursday?
dJE
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
Daniel, thank you for your reply. I will send the file as soon as possible, when I am at work. (In my country, Iran Friday is weekend.)
-
Oooh, I didn't know that!
So do you have Friday/Saturday off work and work Sunday-Thursday?
dJE
No, Thurseday and Friday are off days.
-
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
Daniel, I did your mentioned instructions, but the text shows the word "UserVariable" instead of the real value of the selected attribute.
I will send a sample of my all unsuccessful efforts in another post.
-
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
One more comment...
When inserting TEXT or MTEXT, there is no any way to insert (or refer to) variables defined within the block, it is just possible in ATTDEF.
-
It should work if it was created in that drawing.
If an object and a text or attribute with a field referencing it were inserted into another drawing the field's link would be broken since the object and it's ID would be different in the new drawing.
If you were to make multiple copies of an object with a field referencing it all the fields would reference the original object and it that object was deleted it would break the reference to all the copied fields.
tombu, thank you for info, but I just now defined a new bare block, with not any success...
I will send the block in other post.
-
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
One more comment...
When inserting TEXT or MTEXT, there is no any way to insert (or refer to) variables defined within the block, it is just possible in ATTDEF.
It works through fields. When you send post your sample block I’ll show you.
dJE
-
Here is the block and definitions about parameters and attributes.
I am fully astonished understanding the behavior of AutoCAD to use them in Dynamic Blocks.
I draw a table in Excel showing the parameters and attributes and their values. It is enclosed too.
-
I think you'll find it easier to use a piece of text with a field value than with an attribute (I say this from my own experience).
If you want to post your WIP block I'm sure I or someone else will be able to take a look for you.
dJE
One more comment...
When inserting TEXT or MTEXT, there is no any way to insert (or refer to) variables defined within the block, it is just possible in ATTDEF.
It works through fields. When you send post your sample block I’ll show you.
dJE
Daniel, I posted the block.
-
I've downloaded it, thank you.
I'm not sure what you're trying to achieve. What is the finished block going to look like?
Could you post an example of what the block will look like when it's done - obviously use text instead of the attributes and fields. Will there be one of this block in a drawing, or many instances?
dJE