Jump to content

Recommended Posts

Posted

I'm using a batch process to change a the date of a library of drawings from 00/00/00 to a field which shows the save date.

Using the Chtext lisp file, I've used a find and replace to replace 00/00/00 with

%%

However, it is displayed as the code %

Unfortunately the library of drawings is about 100,000 big, so I need to find an automatic solution. REGEN, REGENALL, UPDATEFIELD, don't work, because they don't view it as a field until I click on it.

Any ideas anyone?

 

Maxelkat

Posted

Interesting, I am able to get it to work... upon replacing my text, it displays #### then a regen updates the date...

 

Would you mind posting your code?

Posted

Hi JPlanera,

Sorry for not responding - I didn't know I'd had a response as my notification landed in my spam folder!

This is the code I'm using. It does the same thing whether I enter it manually or let the batch program do it.

It displays the first part of the field code: %

Regen doesn't do anything.

If I click on the text it immediately becomes a field and displays the save date as expected.

 

 (load "Chtext")
Cht
All

T
G
00/00/00
%<\AcVar SaveDate \f "dd/MM/yy">%

_regen
_Qsave

 

Thanks

Elliott

Posted

Try it this way.....

 

(load "chtext")
CHGTEXT
ALL

00/00/00
%<\AcVar SaveDate \f "dd/MM/yy">%
UPDATEFIELD
ALL

REGEN
QSAVE

Posted

I'm still having the exact same issue. Is it because I'm running such an old version of AutoCAD?

Posted

Its entirely possible... As a test, what happens if you manually step through the commands at the command line? Do you still need to click on the field?

Posted

Yes, it's the same if I do it manually.

The text will be in exactly the same place on each drawing - using ddedit I can get the batch program to 'click' on the text, but I can't get it to escape out of the command using script - do you know of any way?

Posted

Lets try this.... Instead of using CHT, use DDEDIT instead. If you can get the batch to activate the text, then just use ddedit to replace the text with the %% string... again, this works for me. I will investigate other options in the mean time

Posted

Or instead of find/replace, do a FIND ERASE create field.....

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