Jump to content

Recommended Posts

Posted

This piece of code will give this message.

What is the reason i can not use a point of some object?

 

 

"

Points must be distinct.

; error: Function cancelled

"

 

 


(defun c:miv ()
 (command "ucs" "v")
 (setq ss1 (ssget))
 (setq a1 (getpoint "select point:"))   ; can't use snap here?
 (command "mirror" ss1 "" a1 "@0,1" "Y")
 (prin1)
 (princ "*Cancel*")
 (command "ucs" "p")
 (PRIN1)
)


Posted

You can use snaps with getpoint:

(defun c:test (/ os)
 (setq os (getvar 'osmode))
 (setvar 'osmode 16383)
 (getpoint)
 (setvar 'osmode os)
 (princ)
)

Posted

@Hans:

This is such a classic issue...

Replace:

(command "mirror" ss1 "" a1 "@0,1" "Y")

With:

(command "mirror" ss1 "" "_non" a1 "_non" "@0,1" "Y")

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