Properties not available in Python? 2004-07-02 - By Guy Rabiller
Back Better use this:
for iSel in Application.Selection:
Application.LogMessage(iSel.FullName)
-- guy rabiller | 3d technical director @ LaMaison
-- -- Original Message -- -- From: "Bernard Lebel" <atyss4si@(protected)> To: <XSI@(protected)> Sent: Friday, July 02, 2004 8:49 PM Subject: [Script] Properties not available in Python?
> Hello, > > Trying out some ultra basic things in Python, in this case I'm trying a doc > example letter for letter, and it doesn't work! :-( > > From "Groups, Colleciton and Array" (XSI 3.5.11 docs): > > # -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > oSelList = Application.Selection > > for iSel in range(oSelList.Count): > Application.LogMessage(oSelList.Item(iSel).FullName) > # -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- > > When I run this code, I get this error: > > #ERROR : "Traceback (most recent call last): > # File "<Script Block >", line 4, in ? > # Application.LogMessage(oSelList.Item(iSel).FullName) > # File "C:\Python23\Lib\site-packages\win32com\client\__init__.py", line > 454, in __getattr__ > # raise AttributeError, "'??????' object has no attribute '????????1'" > (repr(self), attr) > #AttributeError: '<win32com.gen_py.Softimage|XSI Object Model Library > v1.5.X3DObject instance at 0x557334576>' object has no attribute 'FullName' > # - [line 454]" > > > I mean, what the...? > > > > Thanks > Bernard > > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2800.1400" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY> <DIV><FONT face=Arial size=2>Better use this:</FONT></DIV> <DIV><FONT size=2></FONT> </DIV> <DIV> <P><FONT face=Fixedsys size=2>for iSel in Application.Selection:</FONT></P> <P><FONT face=Fixedsys size=2> Application.LogMessage(iSel.FullName)</FONT></P></DIV> <DIV><FONT face=Arial size=2>--<BR>guy rabiller | 3d technical director @ LaMaison</FONT></DIV> <DIV><FONT face=Arial size=2><BR> </DIV></FONT> <DIV><FONT face=Arial size=2>-- -- Original Message -- -- </FONT> <DIV><FONT face=Arial size=2>From: "Bernard Lebel" <</FONT><A href="mailto:atyss4si@(protected)"><FONT face=Arial size=2>atyss4si@(protected)</FONT></A><FONT face=Arial size=2>></FONT></DIV> <DIV><FONT face=Arial size=2>To: <</FONT><A href="mailto:XSI@(protected)"><FONT face=Arial size=2>XSI@(protected)</FONT></A><FONT face=Arial size=2>></FONT></DIV> <DIV><FONT face=Arial size=2>Sent: Friday, July 02, 2004 8:49 PM</FONT></DIV> <DIV><FONT face=Arial size=2>Subject: [Script] Properties not available in Python?</FONT></DIV></DIV> <DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT face=Arial size=2>> Hello,<BR>> <BR>> Trying out some ultra basic things in Python, in this case I'm trying a doc <BR>> example letter for letter, and it doesn't work! :-(<BR>> <BR>> From "Groups, Colleciton and Array" (XSI 3.5.11 docs):<BR>> <BR>> # -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---<BR>> oSelList = Application.Selection<BR>> <BR>> for iSel in range(oSelList.Count):<BR>> Application.LogMessage(oSelList.Item(iSel).FullName)<BR>> # -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---<BR>> <BR>> When I run this code, I get this error:<BR>> <BR>> #ERROR : "Traceback (most recent call last):<BR>> # File "<Script Block >", line 4, in ?<BR>> # Application.LogMessage(oSelList.Item(iSel).FullName)<BR>> # File "C:\Python23\Lib\site-packages\win32com\client\__init__.py", line <BR>> 454, in __getattr__<BR>> # raise AttributeError, "'??????' object has no attribute '????????1'" <BR>> (repr(self), attr)<BR>> #AttributeError: '<win32com.gen_py.Softimage|XSI Object Model Library <BR>> v1.5.X3DObject instance at 0x557334576>' object has no attribute 'FullName'<BR>> # - [line 454]"<BR>> <BR>> <BR>> I mean, what the...?<BR>> <BR>> <BR>> <BR>> Thanks<BR>> Bernard<BR>> <BR>> <BR>> ---<BR>> Unsubscribe? Mail </FONT><A href="mailto:Majordomo@(protected)"><FONT face=Arial size=2>Majordomo@(protected)</FONT></A><FONT face=Arial size=2> with the following text in body:<BR>> unsubscribe xsi<BR>> <BR>> </FONT></BODY></HTML>
|
|