Jump to content

Question from beginner


teknomatika

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...