How do I create a dynamic block with an attribute that will display the X, Y, and Z values of where ever it has been placed?
|
How do I create a dynamic block with an attribute that will display the X, Y, and Z values of where ever it has been placed?
Here is something quick...You can use a field inside the attribute...Unfortunately, you have to regen if you move it to get the position back...I hope this helps...
Hi "sammyz28"
Please note I have *moved* this thread from the AutoCAD Customization forum to this one, as I feel this particular forum is a more appropriate place for such a topic.
Thanks, Mike
Forum Manager
Originally Posted by Ogre
Thank you so much sir, that is exactly what I was looking for. Could you explain how you set up the field?
Last edited by sammyz28; 2007-06-11 at 08:03 PM.
You create your attribute and right-click the "default" value in the edit attribute definition screen.Originally Posted by sammyz28
Select Insert Field.
In the field category, select "Objects". Now goto the field names and select "Block Place Holder"
In the Block Reference Property column, look down till you see "Position" and select that.
And that pretty well does it.
Just be sure to note that the block right now is set to note your insertion point. If you want the POSITION that the block tracks to be different, then make sure that THAT point is set to 0,0,0 insertion.
You may need a base point parameter as well, so be aware of that too.
[SIGPIC][/SIGPIC]
Return of the Cowbell
Here is what I have so far. I have a basic symbol for the core boring. I have an attribute above the symbol to call out the boring and underneath I have the X Y Z values. I am pleased so far, but It can be better. Every time I insert the block I have to press enter for for the X Y Z values. Is there a way to make it so that the info gets inserted with out having to press enter all those times?
Check the "Constant" check box in the ATTDEF dialog box...This way all you have to do is REGEN to get the coordinates...Originally Posted by sammyz28
Sorry...It needs to be "Preset" not "Constant"...Originally Posted by Ogre
Here is the revised block...
By "Enter" I assume you mean regen?Originally Posted by sammyz28
I don't think there's any way of changing this. The system variable FIELDEVAL only updates the fields upon opening a drawing, closing a drawing, saving a drawing, plotting a drawing, e-transmitting a drawing and regenerating a drawing.
I have not seen an "update upon move" option.
[SIGPIC][/SIGPIC]
Return of the Cowbell
It's possible that you mean "Enter" upon insertion. And the answer there too is "no". You have to press enter and acknowledge that you are inserting and not changing the fields. After doing this, the block will insert and be set to whatever insertion point you told it to.Originally Posted by sammyz28
[SIGPIC][/SIGPIC]
Return of the Cowbell