Jump to content

Recommended Posts

Posted

whats wrong with this code

 

  (initget 0 "MEter Millimeter")
(if (setq DwgScle (getkword "\nWhat is Drawing Units? [MEter/Millimeter] "))
 (if (> 6 (strlen DwgScle))
   (progn
     (command "_.-style" "EC-22-0.1" "romans.shx" "0.22" "0.8" "0" "n" "n" "n")
     (setvar "textsize" 0.22)
     (setq num:Size 0.22))
   (progn
     (command "_.-style" "EC-22-100" "romans.shx" "220" "0.8" "0" "n" "n" "n")
     (setvar "textsize" 220)
     (setq num:Size 220))))

 

its a part of a lisp

When try every line speetly, working well

but all not working

this is error

What is Drawing Units? [MEter/Millimeter] ME

Invalid option keyword.

What is Drawing Units? [MEter/Millimeter]

nil

Posted

Not sure, but is '0' a valid bit value for initget?

Posted

Well, I just took a few minutes to test it and it works for me. It doesn't seem to matter what the bit value is. So I don't know what is wrong. Could you post the whole program? Maybe that would give us a clue.

 

Edit : I don't have Autocad, only Intellicad. It might be that Autocad is more picky about the bit values. Try a different value.

Posted

Look up initget in the Visual LISP Help files to see what the bit codes equate to. :thumbsup:

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