Is there a function or a method to extract a variable's name into a string

Jan 11, 2004 2 Replies

I'm trying to come up with a function to help me while I write other lisp programs that will plot variables that are points into autocad with nodes and text stating what variable it is, currently I'm using a foreach function and assigning a number to each point that is plotted, since I know the order of which I assigned the variables into the list I know which number resembles what variable. But if I had a way to extract the variable name into a variable itself, it would make this little utility much nicer.



Here is what I'm using now


(setq counter 0) (foreach f (list ;|Enter points|; ) ;enter points (command "point" f) (setq counter (+ counter 1)) (command ".text" f "" counter "") )


Also are there any other AutoLISP editors out there that might be better than the one that comes with Acad 2002?



Thanks


HiHo; If I understand you, you want to plot a X,Y,Z point with a number and a descriptor. If that is the case there are a number of civil programs, many for free, that will do just that. Search

formatting link
for a point importer. It will read a file and place the points at the appropriate location. If you can't find it let me know and I will send it to you in a email.

Not sure how your points are being collected, but why not record the name with the point, maybe a sub-list format, like:

( (varname (x y z)) (varname (x y z)) .... )

Not that I've seen. I still use notepad and a similar text editor. There was a dos program called Ally, which I thought was perfect, but to my knowledge, they stopped development long ago. It used color coded parens, each level of nesting was a different color.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required