Jump to content

Recommended Posts

Posted

Hi All,

 

It is going well and I am so happy! Thanks for your help

 

as another try, I wrote:

(defun C:prac6 (/ a b)

(setq a 1)

(setq b 1)

(if

(= a b)

((command "_insert" "ssw1" '(0. 0. 0.) 1. 1. 0.)))

(command "zoom" "e")

)

 

and I get this error!

Command: PRAC6

_insert Enter block name or [?] : ssw1

Units: Millimeters Conversion: 1.0000

Specify insertion point or [basepoint/Scale/X/Y/Z/Rotate]:

Enter X scale factor, specify opposite corner, or [Corner/XYZ] :

1.000000000000000 Enter Y scale factor : 1.000000000000000

Specify rotation angle : 0.000000000000000

Command: ; error: no function definition: nil

 

what does it mean and how can I fix it?

 

Cheers

 

Ali

Posted

No reason to start a new thread.

 

You have too many parens around your insertion.

 

eg.

((command "_insert" "ssw1" '(0. 0. 0.) 1. 1. 0.)))

 

make:

(command "_insert" "ssw1" '(0. 0. 0.) 1. 1. 0.))

 

Nice and clean:

(defun C:prac6 (/ a b)
 (setq a 1)
 (setq b 1)
 (if (= a b)
   (command "_insert" "ssw1" '(0. 0. 0.) 1. 1. 0.)
 )
 (command "zoom" "e")
)

Posted

PERFECT!

 

you are the man!

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