Notice the error message : “UI Items should be specified as a 1D array of String/Value pairs.”
It should be 1d array of label/value pairs. So try to modify below codes as : MatTypes = [“Mat1”, "Mat1", "Mat2", "Mat2", "Mat3","Mat3"] Thanks, Joany From: [email protected] [mailto:[email protected]] On Behalf Of philipp seis Sent: Wednesday, April 23, 2014 5:52 PM To: [email protected] Subject: siComboBox Dear listers, i hope someone has a hint for me here, cause me = lost. I want to make a layout using siComboBox. It gives me an error claiming: "python\Lib\site-packages\win32com\client\dynamic.py", line 258, in _ApplyTypes-" Can i do something about that ? And then it says i shoud use a 1D Array, which i guess i have...,so ??? ----------------- this is what i'm running: ------- xsi = Application lm = xsi.logmessage from win32com.client import constants as c from win32com.client import Dispatch as d oRoot = xsi.ActiveSceneRoot oRsCP = oRoot.AddProperty("CustomProperty",False,'RedShiftMaterial') MatTypes = ["Mat1", "Mat2", "Mat3"] RsLayout = oRsCP.PPGLayout # evil line throwing the error : RsLayout.AddEnumControl("ChooseMaterial", MatTypes, "Type", c.siControlCombo) xsi.InspectObj(oRsCP) -------------------------------------------------------------------------------------- Log: -------- # ERROR : 2229 - Traceback (most recent call last): # File "<Script Block >", line 18, in <module> # RsLayout.AddEnumControl("ChooseMaterial", MatTypesCombo, "Type", c.siControlCombo) # File "<COMObject <unknown>>", line 3, in AddEnumControl # File "C:\Program Files\Autodesk\Softimage 2013 SP1\Application\python\Lib\site-packages\win32com\client\dynamic.py", line 258, in _ApplyTypes_ # result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes) + args) # COM Error: Invalid argument. UI Items should be specified as a 1D array of String/Value pairs. - [line 18] kind regards, philipp
<<attachment: winmail.dat>>

