As far as I know, you have to split your code using input and output variables into multiple blocks, of which you can then turn off the preview in the traditional way.
Maybe someone else here knows a programmatic way to do it.
Hi Sed07,
Thanks alot, yes by putting into nodes then we can do as conventionally its done.
but i am looking as is there any programming way to turn off the display in code.
i hope somebody ll give us some solutions.
cheers

can’t you do something like (unknown to DesignScript):
#change flavour value 1, 2, 3
flavour = 1
flavour == 1 ? point : flavour == 2 : circle : flavour ==3 : polygon
Dear Jonathan!
I am very thankful to you for this generous help exactly thats what i was looking for but you defined it as a function and then call it. i am grateful to you.
have a nice day.
Cheers. 
If a comment solved your problem please mark it as the solution for future reference
And have a nice day yourself, Cheers 




