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 =
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
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)
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 peter@googlemail.com wrote:
Ah yeah, looking at the docs AddProp uses those funky ISIVTCollection
things to return a collection
for obj in Application.Selection:
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 ]
[
All right guys, sometimes it helps to read the whole thread... :)
Peter already mentioned *obj.AddProperty()* a few mails earlier - feel free
to ignore my last mail...
Cheers, Martin
--
Martin Chatterjee
[ Freelance Technical Director ]
[ http://www.chatterjee.de ]
[
Hi list,
I don't understand why this won't work. Consider the following 1-liner:
*print Application.Selection(0).Properties(Visibility).viewvis.Value*
This works as expected. But when I try this:
*for obj in Application.Selection:
print obj.Properties(Visibility).viewvis.Value*
I get an
for obj in Application.Selection:
print hasattr( obj.Properties(Visibility), viewvis )
for i in range( Application.Selection.Count ) :
print hasattr( Application.Selection(i).Properties(Visibility),
viewvis )
print '#'
import win32com.client
for obj in
https://groups.google.com/d/msg/xsi_list/NSV-e-thdtY/d9Vp49sZAzUJ
On 23/01/2013 9:32 AM, Stephen Blair wrote:
for obj in Application.Selection:
print hasattr( obj.Properties(Visibility), viewvis )
for i in range( Application.Selection.Count ) :
print hasattr(
The explicit form always work, a bit more to type but it's more reliable
IMHO.
print Application.Selection(0).Properties(Visibility).*Parameters*
(viewvis).Value
On Wed, Jan 23, 2013 at 3:46 PM, Stephen Blair stephenrbl...@gmail.comwrote:
Thank you for the explanations Stephen and César!
11 matches
Mail list logo