Jump to content

Recommended Posts

Posted

What is failing to not work properly?:oops:

 

;;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)
)

Posted

maybe so?:oops:

 

;;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)
)

Posted

The issue is the way you tried to build the coordinates list:

(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" [color=red](list [/color]x y zv[color=red])[/color])
(princ)
)

Posted
The issue is the way you tried to build the coordinates list:

(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" [color=red](list [/color]x y zv[color=red])[/color])
(princ)
)

 

Tanks, Mircea.

 

However, how do I set routine by the size of the point style. For example, to determine their visibility in absolute units?

Posted

Please check the PDSIZE system variable - will need to input a positive value for absolute units (the negative one means percentage of viewport size).

Posted
Please check the PDSIZE system variable - will need to input a positive value for absolute units (the negative one means percentage of viewport size).

 

Tanks, Mircea.

Resolved.

Posted

Not sure I would use getdist

 

 (setq zv (getdist "\nZ Value:"))
(setq zv (getreal "\nZ Value:"))
or
(setq zv (getdist pt "\nZ Value:"))

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...