Jump to content

Can a Diesel Expression in a field be updated.


muck

Recommended Posts

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,

Link to comment
Share on other sites

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..

Link to comment
Share on other sites

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,

Link to comment
Share on other sites

.... 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.

Link to comment
Share on other sites

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,

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...