muck Posted February 15, 2011 Posted February 15, 2011 I have put Diesel Expression in AutoCAD fields but they do not update on autoCAD Regen. So is there a way to make a Diesel Expression in a field update a field using visual basic or any other programming or nonprogramming tool available in AutoCAD 2010? See link http://www.eng-tips.com/viewthread.cfm?qid=229781&page=22 for reference. Thank you, Quote
fixo Posted February 15, 2011 Posted February 15, 2011 I'm still waiting for response here http://www.cadtutor.net/forum/showthread.php?56714-Placing-a-partical-Block-Attribute-Value-in-a-Field Quote
rkmcswain Posted February 15, 2011 Posted February 15, 2011 I have put Diesel Expression in AutoCAD fields but they do not update on autoCAD Regen. To clarify... you are creating a DIESEL field to make use of SUBSTR, using the 'field code' (of an ATTRIB object) as the string to be trimmed... right...? If you go back and look at the field definition after creating it (the DIESEL one), you should see that the 'field code' you entered earlier was evaluated and the 'field code' itself is no longer there. That is why it's not updating.. Quote
muck Posted February 17, 2011 Author Posted February 17, 2011 Ok, This is what I am trying to do? I made a vba program to insert blocks with attributes in elecrical drawings by reading a spread sheet. I would like to read those attributes and put them in other places in the drawing so I looked a fields. Fields can read attributes so I might not have to use programming to duplicte attributes in my drawings. I could let fields read my attributes from my inserted block. The problem I ran into is that I only want partical attribute values in some parts of my drawing for cable names etc. Many times a cable name is not the complete attribute value. It may be only a attribute prefix or suffix. So I looked at using diesel expressions in fields to clip attribute strings. I was able to clip an attribute field but fields with diesel expressions will not update themselves. So at this time this is a stopping point for me to use fields. So maybe there is another way to do this? Thank you, Quote
rkmcswain Posted February 17, 2011 Posted February 17, 2011 .... I was able to clip an attribute field but fields with diesel expressions will not update themselves. It's not that the field fails to update, there is just nothing there to update. As soon as you paste the %%).TextString>% into the DIESEL string, it is evaluated to TEXT at that point, and the "code" goes away. So, unless someone can come up with a way to work around that, you may have to use lisp/vba/arx/etc. Quote
muck Posted February 21, 2011 Author Posted February 21, 2011 I think I am better off to give up on using diesel functions in fields for partical attribute values. I think I would be better off to clip attribute values in Visual Basic and then place them in a block as hidden attributes. Then I could use fields to read in the drawing as needed. Thank you, Quote
Recommended Posts
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.