maybe so?
Code:;;writing point with z value (defun c:wpz() (setvar "PDMODE" 3) (setq pt (getpoint "\nPoint:")) (setq zv (getdist "\nZ Value:")) (setq x (car pt)) (setq y (cadr pt)) (setq cord (list x y zv)) (command "point" cord) (princ) )
Registered forum members do not see this ad.
What is failing to not work properly?
Code:;;writing point with z value (defun c:wpz() (setvar "PDMODE" 3) (setq pt (getpoint "\nPoint:")) (setq zv (getdist "\nZ Value:")) (setq x (car pt)) (setq y (cadr pt)) (command "point" x y zv) (princ) )
maybe so?
Code:;;writing point with z value (defun c:wpz() (setvar "PDMODE" 3) (setq pt (getpoint "\nPoint:")) (setq zv (getdist "\nZ Value:")) (setq x (car pt)) (setq y (cadr pt)) (setq cord (list x y zv)) (command "point" cord) (princ) )
The issue is the way you tried to build the coordinates list:
Code:(defun c:wpz() (setvar "PDMODE" 3) (setq pt (getpoint "\nPoint:")) (setq zv (getdist "\nZ Value:")) (setq x (car pt)) (setq y (cadr pt)) (command "point" (list x y zv)) (princ) )
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3
Please check the PDSIZE system variable - will need to input a positive value for absolute units (the negative one means percentage of viewport size).
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3




Not sure I would use getdist
Code:(setq zv (getdist "\nZ Value:")) (setq zv (getreal "\nZ Value:")) or (setq zv (getdist pt "\nZ Value:"))
A man who never made mistakes never made anything
First, I was also tempted to suggest to constrain indication of that distance from insertion point, but later thought that, since OP doesn't gave info about his scenario, then is possible that he/she will pick the said distance in a different part of the drawing.
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3




Registered forum members do not see this ad.
A lot of people use GETDIST thinking its as the name implies get a distance when asking for the user to actually enter a value via the keyboard. Its real purpose is to get a distance using mouse style screen input.
A man who never made mistakes never made anything
Bookmarks