General AutoLISP question

Dec 05, 2003 2 Replies

Currently I have been setting up functions in a file as follows



;begin file (defun common_function () (..............) )



(defun c:Option1 () (xxxxxxx) (common_function) )



(defun c:Option2 () (yyyyyyy) (common_function) ) ; end file



The problem I have run into is that if (common_function) is somehow defined as something else later it causes mayhem. Outside of making the function local to both c: functions, is there a better way of doing this to address this scenario. Thanks Cliff


as something else later it causes mayhem. Outside of

this to address this scenario.

I don't know of any solutions other than what you already mentioned. Why would (common_function) get redefined? It would seem that the only way this would normally happen is if your code redefines it somewhere. If you're concerned, or are having trouble, make sure your code isn't doing and/or make the common_function a unique name (add your initials and a date, or some such method).

as something else later it causes mayhem. Outside of

doing this to address this scenario.

Join the Discussion

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

Didn't find your answer?

Ask the community — no account required