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 (progn (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)) ;(draw-wp) (setq ss (ssget "WP" vertices)) (if ss (progn (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 )
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:
They are Autodesks lisp functions. In 2011 version in the help folder look for a chm named ACMAPLISP. Those functions are listed in there.
Access a broad range of knowledge to help get the most out of your products and services.