[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Ensure that Certain Fields Will Update
Tip# 4380 By Andrea Andreetti On 20-Oct-2014
0
Rated By 0 users
Categories : LISP Code Modules
Software type : AutoCAD 2015
Rename File To : No Files to download.
This is a good tip for anyone who relies on fields that reference AutoLISP variables.

If you have a startup routine that sets certain LISP variables, and your fields point to these variables, it's possible that your fields won't get updated when you think they should.

Here is some LISP code that can be loaded and executed at startup, which will cause the appropriate modules required to update fields to be loaded. Insert the code below into your acaddoc.LSP file, then restart AutoCAD.

     (defun fieldinit (/ CadArx AcField)
       (setq CadArx (arx))
     (if (and
           (or
           (not (member "acfdeval.crx" CadArx))
           (not (member "acfdui.arx" CadArx))
           (not (member "acfield.arx" CadArx))
           )
           (findfile (setq AcField (strcat (vl-filename-directory (findfile "acad.exe")) "AcField.arx")))
         )
       (arxload AcField)
       )
       (princ)
       )
     (fieldinit)

Notes from Cadalyst tip reviewer R.K. McSwain: This is a good tip for anyone who relies on fields that reference AutoLISP variables. It's also good to know in case you do not want certain fields to update. Keep in mind that the value of Fieldeval still determines when fields are updated.
 

 

Average Rating:
0


User comments


Log In