Jump to content

DIMLFAC Message Alert Box Creation


Guest balajibth84

Recommended Posts

Guest balajibth84

I am Using the Short Code For "DIMLFAC"..Now i want to Create Alert.I have already created.But As per this "DF0"(Plz Look Down Codes) my Alert message is not Coming.As per this Code alert is coming on Lsp loaded time.Now i want to Show here as per the Currect Usage Of Dimlfac like now its in Enter new value for DIMLFAC or 2,3 or 4..As per the Current Using DimlFac its should be shown in Alert Pallete...So how to Create that Alert????I want this Alert only For "DF0".Bcoz we want to know now we r in Which "DIMLFAC" means we will clarify with this Alert box.So plz edit my Code for Alert message for this below mentioned "DF0"

 

(defun c:df1()

(command "DIMLFAC" "1" ))

 

(defun c:df15()

(command "DIMLFAC" "0.6666" ))

 

(defun c:df2()

(command "DIMLFAC" "0.5" ))

 

(defun c:df3()

(command "DIMLFAC" "0.3333" ))

 

(defun c:df0()

(command "DIMLFAC" ))

(alert

(strcat "\n>>>...Enter new value for DIMLFAC ...

" ...For Exit Press ESC...:-)"

) ;_ end_strcat

) ;_ end_alert

Link to comment
Share on other sites

Alert function is only for warning, so it's not for inserting values or data.

 

In your method you can use if function to check if the inserted value for example is equa to zero so the alert function would comeup to warn the user that the value is not excepted.

 

Good luck

Link to comment
Share on other sites

Check this way out ...........

 

(defun c:df (/ data)
 (if (eq (setq data (getdist "\n Enter new value :")) 0)
   (alert "\n>>>...Enter new value for DIMLFAC <1.0000>....<<< ")
   (command "_.dimlfac" (rtos data 2 2) )
   )
(princ)
 )  

 

Tharwat

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