noshlo Posted August 27, 2010 Posted August 27, 2010 Hi I'm doing my first macro and trying to place a coordinate reference on a layout, I want to get a cross in the center of a tank and the xy coordinates but I dont get the lines to work, any one who could help me. This is a part of the code I believe should draw my centerlines. but I get a error: bad function: when i test it. It's my first attempt on lisp I'm not sure it's correct. (defun c:cross ( / xyz xyz3 ptx pty ptz size x1 y1 ylin xlin uprec) ; Ask user for the number of decimal places: (setq uprec (getint "Label precision: ")) (setq xyz (getpoint "pick point: " )) (setq ptx (car xyz) pty (cadr xyz) pzz (caddr yxz) ) (setq size (getint "Tank diameter:" )) ; Truncate values: (setq ptx ( ptx 2 uprec) ) (pty ( pty 2 uprec)) (ptz ( ptz 2 uprec)) (setq x1 (ptx - size) y1 ( pty - size) ) (setq ylin (strcat ptx y1 pz) xlin (strcat x1 pty ptz) ) (command "line" ylin ) (command "polar" size 90 "" ) (command "line" "polar" size 0 "") ) Quote
Michaels Posted August 27, 2010 Posted August 27, 2010 You can use the command "dimcenter" to make a cross in a circle. Regards. Quote
lpseifert Posted August 27, 2010 Posted August 27, 2010 lisp tries to evaluate the first 'argument' after a ( as a function. ptx, pty, ptz are not a functions- hence the bad function also check your variables for typos there is no command 'Polar' in autocad you're trying to supply a string to the line command just a start Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.