Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Python and FindObjects()

Python and FindObjects()

2005-03-28       - By Bernard Lebel

 Back
Reply:     1     2     3  

Hello,

I have no problem using the FindObjects() command inside a script, but
it always fails miserably when run from an imported module.



This is the module content:

### Module blTest.py
import win32com

Application = win32com.client.Dispatch( 'XSI.Application' )
xsi = Application

oLights = xsi.FindObjects( '', '{F3705C30-5204-11D0-8298-00A0243E366B}' )
###



Now, if I import the module (import blTest), I get this mysterious
attribute error:

#ERROR : Traceback (most recent call last):
#  File "<Script Block >", line 1, in ?
#    import blTest
#  File
"\\enigmus\xsiworkgroups\scripts\Data\Scripts\_general\xsiclasses\blHandlers
\blTest.py",
line 6, in ?
#    oLights = xsi.FindObjects( '',
'{F3705C30-5204-11D0-8298-00A0243E366B}' )
#  File "D:\Python23\Lib\site-packages\win32com\client\dynamic.py", line
489, in __getattr__
#    raise AttributeError, "%s.%s" % (self._username_, attr)
#AttributeError: XSI.Application.FindObjects
# - [line 1]




Anyone has a clue might go wrong here? Everything else seems to work
(like logmessage, findchildren and such), but not findobjects.



Thanks
Bernard

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi