Hi guys,
I have seen the command GETVAL in many LISP routines but I dont know how to use it ,
I have no information on GETVAL and I dont know where to find some information, like how to use it and so on...
Your help is highly apreciated,
Regards
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
@copoljan wrote:....
I have seen the command GETVAL in many LISP routines but I dont know how to use it ,
I have no information on GETVAL and I dont know where to find some information, like how to use it and so on...
....
That would be a locally defined function, and I've found that name used with different definitions. I think most often it's a shortcut function for getting a value from entity data, for example it could be a subroutine within a larger routine, something like this:
(defun getval (dxf)
(cdr (assoc dxf edata))
)
Then, with the entity data from an object saved to the 'edata' variable, you can get information from it a little more concisely, e.g. to find the insertion point of a Block, you do this:
(getval 10)
instead of needing to do this:
(cdr (assoc 10 edata))
But some people's definitions require both the dxf code number and the entity data variable as arguments, so that they can be used on multiple entities' data. Some take the entity name as an argument, and have (entget) included within the definition of (getval) to get the data list. Some seem not to be about entity data at all, but intended for different kinds of values. Since it's not always defined the same way, you can't find a definition of it somewhere and expect to be able use that in other places where the (getval) name is used, unless they're in code from the same source.