Jump to content

Recommended Posts

Posted

Hello,

 

I have lisp. see below ... I cant see the rectangle when I make mtext. Why?

 

lisp

 

(defun C:MTEXT50 (/ oldlay)
 (setq oldlay (getvar "clayer"))
 (vl-load-com)
 (setvar "cmdecho" 0)
 (if (not (tblsearch "LAYER" "A-------T1-------E"))
           (command "-layer" "M" "A-------T1-------E" "C" "red" "A-------T1-------E" "")
           (setvar "clayer" "A-------T1-------E")
           ) ; end if


 (setvar "cmdecho" 0) 
(command ".style" "" "" "300" "" "" "" "")
(setvar "cmdecho" 1)
(setq PT1 (getpoint "\n First Corner :"))
(setq PT2 (getpoint "\n Second corner :"))
 (initdia)
(command "mtext" PT1 PT2)
(setvar "clayer" oldlay)

 ); end 

Posted

Change this part:

 

(setq PT1 (getpoint "\n First Corner :"))
(setq PT2 (getcorner PT1 "\n Second corner :"))

I hope that's what you're looking for.

Posted

Change these two lines

(setq PT1 (getpoint "\n First Corner :"))
(setq PT2 (getpoint "\n Second corner :"))

must be:

(setq PT1 (getpoint "\n First Corner :"))
(setq PT2 (getcorner PT1 "\n Second corner :"))

 

~'J'~

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