AutoCAD Map 3D Developer

AutoCAD Map 3D Developer

208 Posts
8 Kudos
Registered: ‎08-21-2007
Post 1 of 3

Vlisp OD

262 Views, 2 Replies
05-06-2013 06:04 PM

I have a very old LISP program, badly written I must say.

anyway it crashes in Map2013 after a number of "Invalid record number"


I narrowed it down to commands that are reading and writting object data as the possiable culprit

where can I find info on the the syntax for the following commands.








;Get all closed plines and write pline data to everything inside them
(defun c:pl-data ()

  (setvar "cmdecho" 0)
  (setq pl-ss (ssget '((0 . "LWPOLYLINE") (8 . "LOT"))))
  ;(setq pl-ss (ssget))
  (if pl-ss
      (setq pl-len (sslength pl-ss))
      (setq pl-cntr 0)
      (repeat pl-len
        (setq pl (ssname pl-ss pl-cntr))
	(setq name (ade_odgetfield pl "LOT" "LOTKEY" 0))
	(setq data (entget pl))
	(setq vertices (get-vertices data))
	(setq ss (ssget "WP" vertices))
	(if ss
	    (setq cntr 0)
	    (setq len (sslength ss))
	    (repeat len
	      (setq e (ssname ss cntr))
	      (if (ade_odgetfield e "LOT" "LOTKEY" 0)
					;check to see if CITY table already attached
		(progn			;if yes - set the field to l-num
		  (ade_odsetfield e "LOT" "LOTKEY" 0 name)
		  (command "change" e "" "p" "c" "bylayer" "")
		(progn			;if not, attach the table then set field to l-num
		  (ade_odaddrecord e "LOT")
		  (ade_odsetfield e "LOT" "LOTKEY" 0 name)
		  (command "change" e "" "p" "c" "bylayer" "")
	      (setq cntr (+ cntr 1))
	    );end repeat
	  );end progn
	);end if
	(setq pl-cntr (+ pl-cntr 1))
      );end 1st repeat
    );end progn
  );end if


Distinguished Contributor
138 Posts
7 Kudos
Registered: ‎11-13-2006
Post 2 of 3

Re: Vlisp OD

05-16-2013 12:45 PM in reply to: mfernandes

I believe these come from Four Dimension Technologies.

I have used some of these routines for working with object data.


Try this site, under the Autocad Map category:



*Expert Elite*
2,143 Posts
207 Kudos
Registered: ‎11-13-2006
Post 3 of 3

Re: Vlisp OD

05-16-2013 04:07 PM in reply to: cjneper

They are Autodesks lisp functions. In 2011 version in the help folder look for a chm named ACMAPLISP. Those functions are listed in there.


Supportting the troops daily.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!