Hello David,
Thanks - that is what I wanted to achieve!
nice to hear that.
Could you explain why you used WindowsInputTypes.Face rather than WindowsInputTypes.Part ? Is that just the way you prefer to do things, or is there a functional reason why?
Functional reason. First thought is obviously Part.
I've tried using Part instead of Face, but it produces odd behaviour while changing selection of Part.
This is a thing where Andy could take a look at...
I'm also a bit mystified by if index == 0:
I can see that it is checking for index to be zero - but I'm not clear why it has to be checked, or indeed what might change it...
The dialog box has a "InputChangedCallback Function (called when an input is changed)" and this Function has two parameter which are handled through to your defined procedure. These two parameter are the index of the changed dialogbox element and the value of this element. The elements of the dialog boxes are numbered.
That's due to they are a list ( Options[n] ).
In this particulary skript you have three elements:
[0] Options.append(['Target Part', WindowsInputTypes.Face, None])
[1] Options.append(['Number', WindowsInputTypes.String, None])
[2] Options.append(['Description', WindowsInputTypes.String, None])
and the defined procedure:
def Showdata(index,value):
If you now change the first element of the box using the mouse selecting a part, this procedure will be call automatically with the parameter (Index = 0 (first options object is face), Face object).
In Showdata i check if the first element (index =0) was changed.
I only want to react to the first element! The other elements sould not trigger any action in the procedure.
With the "part" information i can update the Number and Description. These values can be overwritten throught the user without any reaction of the procedure unless the user hits the button "Set Props" ;-)
Regards
Stefan