Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Negative Value

2 REPLIES 2
Reply
Message 1 of 3
kulfi
465 Views, 2 Replies

Negative Value

Hi,

I have the value for this either negative or Positive it sould it is not negative Value.

Thanks

(setq Depth (getreal "\nEnter the Depth of the Duct..= "))

Kulfi
Electronics Engineer

Pind Saudi Arabia



2 REPLIES 2
Message 2 of 3
Ajilal.Vijayan
in reply to: kulfi

Not sure from your question.

If you dont want negative value and zero use this line before getreal

 

(initget (+ 2 4))
(setq Depth (getreal "\nEnter the Depth of the Duct..= "))

 More info initget

Message 3 of 3


@Ajilal.Vijayan wrote:

....

If you dont want negative value and zero use this line before getreal

 

(initget (+ 2 4))
(setq Depth (getreal "\nEnter the Depth of the Duct..= "))

...


And if you use (getdist) instead of (getreal), the User will have the choice of whether to give that distance by entering a number as for (getreal) or picking two points on-screen.  And if entering a number, they can use any valid distance format including those that (getreal) will not accept, for instance if they use imperial units, they can enter a distance in feet and inches and fractions, decimal feet, etc.  [The option is only for the input format -- in all cases a real number will be returned.]

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost