Author Topic: How inserting user-defined parameter in Dynamic Block as field attribute works?  (Read 12975 times)

0 Members and 2 Guests are viewing this topic.

ahankhah

  • Mosquito
  • Posts: 19
 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.

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
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
===
dJE

tombu

  • Bull Frog
  • Posts: 288
  • ByLayer=>Not0
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.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

ahankhah

  • Mosquito
  • Posts: 19
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.)

ahankhah

  • Mosquito
  • Posts: 19
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.

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
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.)
===
dJE

ahankhah

  • Mosquito
  • Posts: 19
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.

ahankhah

  • Mosquito
  • Posts: 19
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.

ahankhah

  • Mosquito
  • Posts: 19
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.

ahankhah

  • Mosquito
  • Posts: 19
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.

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
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
===
dJE

ahankhah

  • Mosquito
  • Posts: 19
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.

ahankhah

  • Mosquito
  • Posts: 19
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.

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
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
===
dJE