Maxelkat Posted January 17, 2011 Posted January 17, 2011 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 Quote
JPlanera Posted January 18, 2011 Posted January 18, 2011 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? Quote
Maxelkat Posted January 26, 2011 Author Posted January 26, 2011 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 Quote
JPlanera Posted January 26, 2011 Posted January 26, 2011 Try it this way..... (load "chtext") CHGTEXT ALL 00/00/00 %<\AcVar SaveDate \f "dd/MM/yy">% UPDATEFIELD ALL REGEN QSAVE Quote
Maxelkat Posted January 26, 2011 Author Posted January 26, 2011 I'm still having the exact same issue. Is it because I'm running such an old version of AutoCAD? Quote
JPlanera Posted January 26, 2011 Posted January 26, 2011 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? Quote
Maxelkat Posted January 26, 2011 Author Posted January 26, 2011 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? Quote
JPlanera Posted January 26, 2011 Posted January 26, 2011 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 Quote
JPlanera Posted January 26, 2011 Posted January 26, 2011 Or instead of find/replace, do a FIND ERASE create field..... 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.