go = rh.Input.Custom.GetPoint()
go.SetCommandPrompt("Select Point")
go.AcceptNothing(True)
go.Get()
AcceptNothing(self: GetBaseClass, enable: bool)
If you want to allow the user to be able to press enter in order to
skip selecting a something in GetPoint.Get(), GetObject::GetObjects(), etc., then call AcceptNothing( true ) beforehand.
enable: true if user is able to press enter in order to skip selecting.
ma usando AcceptNothing non dovrebbe accettare e gestire un valore nullo premendo il tasto Invio?
Per rendere il plugin user friendly lo sviluppatore memorizza e ripropone un valore
di input inserito in precedenza. Di conseguenza il codice successivo al get deve essere
molto più strutturato. Ma … non vedo il problema. Tutto quello che vien dopo lo devi
gestire tu …
ok provando con CommandResult() qui cambia il risultato, e quindi va gestito
mentre invece se viene omesso CommandResult() il punto viene riportato comunque
(credevo che venisse gestito internamente in automatico senza dover poi usare CommandResult())
infatti lo sto usando in tutti i codici, quella stavo facendo una prova per vedere come funzionasse go.AcceptNothing(True) come già detto, credevo che il punto non venisse proprio accettato
mentre invece il punto viene accettato, ma CommandResult() ritorna cancel