@muhamed_ragab92 wrote:
I WANT TO KNOW , HOW CAN I MAKE IF CONDITION TO COMPARE BETWEEN TWO ISSUES AND SELECT THE RESULT IN TEXT ? I KNOW SOME FEATURE FOR CTRL+F BUT I CANT MAKE IF CONDITION
I'm not sure exactly what you mean. Ctrl+F toggles running Object Snap on or off, and has nothing to do with (if) tests or Text. What does it mean to "select the result in text?" The word "select" is usually about picking already-drawn objects in the drawing. Do you mean to draw some Text in the drawing as the result of the (if) test?
An (if) function doesn't "compare between two issues," but performs a test, and if it returns anything other than nil, does what is called for by its 'then' expression, or if it returns nil, its 'else' expression. But the test it performs could include two test within it, with an (and) function -- if test 1 and test 2 both return something other than nil can be combined into one 'test' expression. But it's still not really "comparing" the issues, but checking each one by itself.
Of, if you mean you want the User to select between two [or more] choices or options by entering text [typing something] to make the choice, this is how that is usually done:
(initget "Yes No")
(setq option (getkword "\nDo you want to do this [Yes/No] <N>: "))
(if (= option "Yes")
(... do whatever it is ...); 'then' expression
(... do something else ...); 'else' expression
); end if
The User can either type in the Y or N [upper- or lower-case] or the whole words, or in newer versions pick the option inside the prompt, and (getkword) will return the whole word.
If you include more than two options, (cond) would be a better function than (if) for doing what is wanted for the option the User choses.
Some more explanation of what the conditions are that you want to compare, and how Text fits in, would be helpful.
Kent Cooper, AIA