Thanks Martin! That was Peter's original suggestion.
His last post was just to explain how to make it work with the command I was using and it's returned ISIVTCollection (which I'm actually used to dealing with, but it didn't occur to me in this instance!) DAN On Fri, Jan 25, 2013 at 2:27 PM, Martin Chatterjee < [email protected]> wrote: > Dan, > > alternatively you should be able to just use the OM method: > > for obj in Application.Selection: > > over = obj.AddProperty("Override", False, "Vis_Override") > LogMessage(over.FullName+" -- "+str(over.Type) ) > > > Cheers, Martin > > > -- > Martin Chatterjee > > [ Freelance Technical Director ] > [ http://www.chatterjee.de ] > [ https://vimeo.com/chatterjee ] > > > On Fri, Jan 25, 2013 at 1:15 PM, Dan Yargici <[email protected]> wrote: > >> Aaaah, OK, I see. I'll try and burn that into memory. >> >> Cheers Peter. >> >> DAN >> >> >> >> On Fri, Jan 25, 2013 at 2:10 PM, Peter Agg <[email protected]>wrote: >> >>> Ah yeah, looking at the docs AddProp uses those funky ISIVTCollection >>> things to return a collection.... >>> >>> >>> for obj in Application.Selection: >>> over = Application.AddProp("Override", obj, "", >>> "Vis_Override")["Value"][0] >>> >>> param = obj.Properties("Visibility").Parameters("viewvis") >>> over.AddParameterEntry(param) >>> >>> That should do it though. >>> >>> >>> >>> On 25 January 2013 11:59, Dan Yargici <[email protected]> wrote: >>> >>>> My last mail's formatting may have been scrambled... >>>> >>>> >>>> >>>> >>>> On Fri, Jan 25, 2013 at 1:58 PM, Dan Yargici <[email protected]>wrote: >>>> >>>>> Indeed it does! Try this however, and it fails again. Seems it's a >>>>> quirk with AddProp. Strange... >>>>> >>>>> for obj in Application.Selection: >>>>> over = obj.AddProp("Override", oObj, "", "Vis_Override") >>>>> param = obj.Properties("Visibility").Parameters("viewvis") >>>>> over.AddParameterEntry(param) >>>>> >>>>> >>>>> On Fri, Jan 25, 2013 at 1:50 PM, Peter Agg >>>>> <[email protected]>wrote: >>>>> >>>>>> for obj in Application.Selection: >>>>>> over = obj.AddProperty("Override", False, "Vis_Override") >>>>>> param = obj.Properties("Visibility").Parameters("viewvis") >>>>>> over.AddParameterEntry(param) >>>>>> >>>>>> >>>>>> Does this not work? >>>>>> >>>>>> >>>>>> >>>>>> On 25 January 2013 11:34, Dan Yargici <[email protected]> wrote: >>>>>> >>>>>>> OK, a little help here... >>>>>>> >>>>>>> This parameter gymnastics gets me every time. I've tried all manner >>>>>>> of variants with no success. Select an object and then run this: >>>>>>> >>>>>>> from win32com.client import dynamic >>>>>>> >>>>>>> xsi = Application >>>>>>> pr = xsi.LogMessage >>>>>>> >>>>>>> for oObj in xsi.Selection: >>>>>>> oOverride = xsi.AddProp("Override", oObj, "", "Vis_Override") >>>>>>> oParam = >>>>>>> dynamic.Dispatch(oObj).Properties("Visibility").Parameters("viewvis") >>>>>>> pr("Look everyone - A Parameter!") >>>>>>> >>>>>>> pr("""dynamic.Dispatch(oObj).Properties("Visibility").Parameters("viewvis")""" >>>>>>> + " is type: " + oParam.type) >>>>>>> pr("...Yet this next line fails :(") >>>>>>> >>>>>>> oOverride.AddParameterEntry(dynamic.Dispatch(oObj).Properties("Visibility").Parameters("viewvis")) >>>>>>> >>>>>>> >>>>>>> DAN >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jan 23, 2013 at 5:10 PM, Christian Gotzinger < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Thank you for the explanations Stephen and César! >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >

