Jump to content

An attribute that is a multiplication of two other Attributes within the same block?


DB007

Recommended Posts

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • JPlanera

    14

  • DB007

    9

  • KnoJa31

    7

  • steven-g

    2

Top Posters In This Topic

Posted Images

Its an industry standard to have the connector on either side be the same. That is because it is the same connector, just broken to show the internal connections

 

The problem is that it needs to be in the block so that if it gets move it moves with the block. (working with engineers who like to think they know what there doing!!).

If its outside if the block it will get over looked.

 

So it seems that fields are not the way to achieve this issue.

Is it possible to link two attributes from a single attribute but have them in the block and not outside of it?

Link to comment
Share on other sites

Well i can think of a few different ways to accomplish this, unfortunately, they are all kinda dirty...

 

The easiest way, would be to have 2 attributes in the block and update them both...

Embedd the Fields in the block and access the block editor to make your adjustment...

Find a custom LISP routine that will do it automatically...

 

I will post another screencast of the first two ideas...

Link to comment
Share on other sites

JPlanera,

 

This is exactly what I needed. I also managed to embed the field within the block. So I can now copy the block as many times as i want and the field is only relative to the attributes within its own block.

 

Ive attached a file showing my result. The text doesn't really make sense at the moment but basically if I change any of the 1st 3 attributes and regen/plot/save etc my weight attribute/field (a simple multiplication of the 3 and then a division to change to the units) automatically updates. Perfect!

 

Thanks for all your help. Im starting to understand why fields are so useful!

 

DB007 was able to get an attribute to multiple other attributes. Wouldn't it be the same concept to have one attribute show the value of another inside of the block?

 

I thought about having two separate attributes in the block. I was just wondering if its possible.

As for the second option... that is not going to work. all of the users have there "BLOCKEDITLOCK" system variable set so that they can not enter block editor. You wouldn't believe what some of these guys do around here!!

 

And a LISP would be to complicated for users. Besides, we have tried implementing LISP's before and they just seem to fade into the background and those that have been around for a bit remember those tools.

Link to comment
Share on other sites

Wow youre not kidding... The reason DB007 was able to do what he did, is because it was all numbers... The formula option of a field does not like text strings... Although i think im on to something... give me a minute and i will post my results!

Link to comment
Share on other sites

Ok so here it is. I found a way around this problem. I kinda cheated a bit... You have to access the block editor to generate this, but once it is done, it is done for good!! Check it out.

http://screencast.com/t/nznXqn4WC6Fd

 

EDIT: Also, if you want to turn off that annoying grey background, set the FIELDDISPLAY variable to 0...

Edited by JPlanera
added info!
Link to comment
Share on other sites

HOLY CRAP!!! :shock:

 

That works perfectly! How the heck did you know how to use mtext instead of a field? Is there a school where you learn this kind of stuff?

 

Sign me up!! :lol:

Link to comment
Share on other sites

8):D Glad I could help. Fields can be used pretty much anywhere, and can contain almost any piece of info you can think of! Manipulating the concept took just a little trial and error.

 

Honestly, you would be suprised at how much you learn just by browsing these forums. I pick up at least one trick every day from this place. Also check out Autodesk University, its free!!

 

Good luck

Link to comment
Share on other sites

  • 2 years later...
JPlanera,

 

This is exactly what I needed. I also managed to embed the field within the block. So I can now copy the block as many times as i want and the field is only relative to the attributes within its own block.

 

Ive attached a file showing my result. The text doesn't really make sense at the moment but basically if I change any of the 1st 3 attributes and regen/plot/save etc my weight attribute/field (a simple multiplication of the 3 and then a division to change to the units) automatically updates. Perfect! :D

 

Thanks for all your help. Im starting to understand why fields are so useful!

 

Digging up a bit of an old problem.. the Field attribute in the block posted in post #14 still works perfectly as I need it to, but I can only use it by copying the block from one file to another. If I use the design centre to drag the block in to a new file the calculation field stops working. Is it possible to fix this?

Link to comment
Share on other sites

You can get it to work with an inserted block, but fields in attributes are a problem to update, one way round that is to introduce a dynamic property into the block that makes the attribute update. Attached is a block that uses a visibility state, once the visibility state is changed and a regen is done the attribute becomes active (you need to do a regen each time you change the values) and obviously don't edit the values in the last attribute.

FIELDS.dwg

Link to comment
Share on other sites

You can get it to work with an inserted block, but fields in attributes are a problem to update, one way round that is to introduce a dynamic property into the block that makes the attribute update. Attached is a block that uses a visibility state, once the visibility state is changed and a regen is done the attribute becomes active (you need to do a regen each time you change the values) and obviously don't edit the values in the last attribute.

 

Thanks for the fast reply! That works great, shame it needs the visibility state to trigger the field to work. I was wondering if there was a dynamic property that didn't require the click, maybe on moving the block or something?

 

Is this a bit of a bug that Autodesk may fix?

Link to comment
Share on other sites

I don't know if it would be considered a bug, when you insert a block it can give you the option to input a value for an attribute, or it will use the value stored in the block definition, once the block is inserted fields still refer to the block definition for the value, using the visibility state is a trick to make the field refer to the actual inserted block and not the definition, and unfortunately that does mean clicking and selecting, or as you do now making copies of an active block. By the way once the block is inserted into the drawing and the vis state altered then you can use that block to copy about the drawing.

Link to comment
Share on other sites

  • 10 months later...

Hi, I used your solution in my block. But there is still some bug with it. In my block and in yours (FIELDS.DWG few post up). I have formula in attribute "T" with use of attributes "KAT" and "R". When I close block editor, those attributes (KAT, R) are placed somewhere in the space. After editing block and placing them in right spot and then closing editor, there are again at the same place (not near block).

 

This problem occurs when I edit values of your block and then insert new block. New block has dislocated attributes (but only from formula, "TYPE" is OK).

blocks.jpg

 

Unfortunately I can't use copy method because I had LISP that insert my block with two attributes exported from selected arc.

Link to comment
Share on other sites

  • 2 months later...

Hi

Please kindly help me out on Attribute name in AutoCAD Lt. I have created a block with Attribute name. Please how can I edit the attribute name. I try changing it through Editing Attribute Definitions but not working. please send me some information to help out.

 

 

Thanks

 

 

Sunny

Link to comment
Share on other sites

Hi

Please kindly help me out on Attribute name in AutoCAD Lt. I have created a block with Attribute name. Please how can I edit the attribute name. I try changing it through Editing Attribute Definitions but not working. please send me some information to help out.

 

 

Thanks

 

 

Sunny

 

It's customary to start a new thread for new questions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...