?
Solved

LISP Routine works in 2002 but not in 2009

Posted on 2011-03-04
1
Medium Priority
?
574 Views
Last Modified: 2012-05-11
Might someone here be able to take a look at the attached LISP routine, which runs successfuly in 2002, to identify why it doesn't run in 2009? (I am a rank rookie when it comes to AutoCAD, and LISP in particular.)
 
The attached LISP routine was written by a user, long gone, to restore titleblock text attributes (size, font, position, etc) and to populate a field in the upper left corner of the drawing border, based on the contents of a title block field.
 
When I run the command in 2009 it clears the contents of the titleblock, replacing the information in each attribute field with an asterisk.
 
More strangley, the command is successful in 2009 under the following circumstance: If I place a border in Drawing1.dwg and DON'T SAVE IT, then populate the titleblock fields, I am able to run the command and see the field in the upper left corner of the drawing border receive information from the 'associated' field in the title block -- just as in 2002. However, once I save Drawing1.dwg as an actual file and run the command again, the title block gets hosed. The following error appears in the command window:
Searching for block TITLE_BLOCK ...Found block TITLE_BLOCK ...; error: no function definition: FLD.

I am in the process of trying to figure out what 'no function definition: FLD' means..

The attached ZIP contains a sample drawing file, the LISP routine, and a docx file with additional information. Any help is appreciated.
 RETITLE.zip
0
Comment
Question by:tsynnott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 12

Accepted Solution

by:
silverkorn earned 2000 total points
ID: 35056704
As per the Autodesk forums found here:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/LISP-routine-works-in-2002-but-not-in-2009-except-when-run-in/td-p/2940524

Your problem has been resolved by inserting one of the following code snippets

 
(defun fld (code)
 (cdr (assoc code elist))
)

Open in new window


 
(defun fld(code)
(cdr (assoc code (entget e)))
)

Open in new window

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following a number of instances of re-installing Solidworks I thought that it may be a  good idea to detail the procedure that I follow each time to ensure a good stable install. Backup: Backup your system.  It goes without saying that this i…
The following article will describe how to add/edit a dimension style through AutoCAD VBA. AutoCAD VBA has its quirks and when it comes to dimensions and controlling how they look through VBA.  This is where AutoCAD can be vividly confusing. The…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question