Command call for lisp

cadman_meg

Usenet Archive
Joined
Jul 14, 2003
Messages
51
Reaction score
0
I can't seem to figure out what the command is for calling this routine. Can someone look at it and let me know please. TIA.

(defun EastNorthToXY (p / AeccApp AeccDocs AeccDoc AeccUtil)    (if (not *acad*)(setq *acad* (vlax-get-acad-object)))    (if       (and          (setq AeccApp (vl-catch-all-apply 'vla-getinterfaceobject (list *acad* "aecc.application")))          (not (vl-catch-all-error-p AeccApp))          (setq AeccDocs (vl-catch-all-apply 'vlax-get (list AeccApp "Documents")))          (not (vl-catch-all-error-p AeccDocs))          (setq AeccDoc (vla-item AeccDocs 0))          (setq AeccUtil (vl-catch-all-apply 'vlax-get (list AeccDoc "Utility")))          (not (vl-catch-all-error-p AeccUtil))          (vlax-method-applicable-p AeccUtil "EastNorthToXy")       )       (vlax-invoke AeccUtil "EastNorthToXy" p)    )
)
 
(eastnorthtoxy p1)
.... where p1 is the point to be processed.
___

cadman_meg said:
I can't seem to figure out what the command is for calling this routine.
Can someone look at it and let me know please. TIA.
 
What I mean is, most lisp have a command defined. Such as "defun C: xyz". This I can not figure becaue that is not in the code and I don't see how else to call upon the commands for the functions within the lisp. Is that much clearer to hopefully get some help? Thanks.
 
What I posted *IS* the answer. You call a non-"C:" function by placing the function, plus any required parameters within a set of parentheses, just like any other LISP function. So, to call the function EastNorthToXY, with its required parameter, the correct syntax is

(eastnorthtoxy p1) ... where p1 is the required parameter -- in this case a point.

That's the only answer possible. If you need more information, I'd suggest perhaps the Customization Guide section of the HELP system might be of interest.
___
 
Revise the defun to have a c:xyz, remove the parameter 'p', and add a (setq p (getpoint)) or other means of assigning the point. Not knowing the purpose of the function more than (vlax-invoke AeccUtil "EastNorthToXy" p) makes things difficult.
 
That makes more sense Dan. Guess some folks assume that everyone knows exactly the same stuff. That is why I reitterated the question. Not that Paul's answer would be suitable to the die hard programmer. Thanks all. Think I will scrap this though because it doesn't even seem like it would be of much use without a hassle. And besides, LDD has a function to do this already.
 

Latest threads

Back
Top