Hello,

we have a problem to pass an array to the GetComponents()-Method of 
CATIA-COM-Object.

The method expects an array as method-parameter. The result will be written in 
the given array. The array must be initialized with 12 elements. You can't pass 
an empty array/dictionary to the method.

For unknown reason, this does not work. The array is not changed.

Does anybody has a solution for this?

Not working source:

# ---- snip ----
CATIA = win32com.client.dynamic.Dispatch("CATIA.Application")
selection = CATIA.ActiveDocument.selection

# error checking
if selection.Count == 0:
  CATIA.Statusbar = "exit1"
  return
if selection.Item2(1).Type <> "Product":
  CATIA.Statusbar = "exit2"
  return

rootProduct = selection.Item2(1).Value
positionArray = [0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0]
result = rootProduct.Products.Item(1).Position.GetComponents(positionArray)
print result
# print result gives defaultvalues of positionArray, 
# but should give other values
# ---- snip ----

Thanks in advance

Andreas
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to