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( Application.Selection(i).Properties("Visibility"),
"viewvis" )
print '#----------------'
import win32com.client
for obj in Application.Selection:
print hasattr( win32com.client.Dispatch( obj
).Properties("Visibility"), "viewvis" )
from win32com.client import dynamic
for obj in Application.Selection:
print hasattr( dynamic.Dispatch( obj ).Properties("Visibility"),
"viewvis" )
# False
# True
# #----------------
# False
# True
On 23/01/2013 8:45 AM, Christian Gotzinger wrote:
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 attribute error?? I only have one or multiple polygon meshes
selected, so the attribute is there.
Christian