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

Default value : incorrect choice

9 REPLIES 9
Reply
Message 1 of 10
YvesLEHURT8573
376 Views, 9 Replies

Default value : incorrect choice

Bonjour,

 

I have this code (see below) and use the (saisie dynamique) "dynamic input"
Dynprompt = 1
Dynmode = 3

 

  (initget 1 "A S")
  (setq ch_vasp (getkword "\nVanne : [Avec/Sans (cas std)]<Sans (cas std)> ? "))


With AutoCAD 2009 I can validate the default value with "Enter"
With AutoCAD 2012 I can't !

I get (Choix de l'option incorrect) Option choice Incorrect

 

Any idea ?
Thanks in advance.

Yves

9 REPLIES 9
Message 2 of 10
pbejse
in reply to: YvesLEHURT8573

initget 1 prevents the user from responding to the request by entering only ENTER.

 

Not sure how you were able to suppress that with 2009, but you shouldnt be able to

Message 3 of 10
YvesLEHURT8573
in reply to: pbejse

Your argument is correct without dynamic input.
With dynamic input on AutoCAD 2009, I can valide the default value.
Why not with AutoCAD 2012 ?

Is there one new sytem variable to manage this ?

 

Regards,

 

Yves

Message 4 of 10
pbejse
in reply to: YvesLEHURT8573

Guess you're right. right now i'm using 2004 version  my 09 cad  bogged down last night. cant test on 2009 much more 2012.

I cant be of any help on that for now YVES  🙂

 

 in any case, did you try removing 1 from your initrget statement?

 

 

Message 5 of 10
YvesLEHURT8573
in reply to: pbejse

If I remove 1 to iniget and if the value of Dynprompt is 0
and validate the question by return
I obtain nil in the variable.

 

So I can't accept this solution.

Sorry.

 

Message 6 of 10
pbejse
in reply to: YvesLEHURT8573

If you DO remove initget 1
you would need to add to your condition statement

(cond
      ((null ch_vasp)(do this))
      ((eq "A" ch_vasp)(do this))
      ((eq "S" ch_vasp)(do this))
      )

 

and its a suggestion not necesarily a solution.

 

or this

 

(initget "A S")
(setq ch_vasp (getkword "\nVanne : [Avec/Sans (cas std)]<Sans (cas std)> ? "))
(if (not ch_vasp) (setq ch_vasp "A")

 

Asfor the new sytem variable and why it wont work in 2012. my anser IDK.

 

Hope this helps anyway Yves

 

Message 7 of 10
YvesLEHURT8573
in reply to: pbejse

My question is "why it doesn't work on AutoCAD 2012 and works on AutoCAD 2009 ?"  

 

Regards,

Yves

Message 8 of 10

I understand and know your solution but ... it's not my choice for this problem.

Sorry

Message 9 of 10
pbejse
in reply to: YvesLEHURT8573


@YvesLEHURT8573 wrote:

I understand and know your solution but ... it's not my choice for this problem.

Sorry


No worries Yves. i would want to know the anser to that question myself even before i start usign 2012

 

Keep us posted if you find the answer

 

🙂

Message 10 of 10
Lee_Mac
in reply to: YvesLEHURT8573

This tutorial may be of some help. Smiley Wink

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

Post to forums  

Autodesk Customer Advisory Groups


Autodesk Design & Make Report