Get vert/tri count in XSI

How in the world do I get the vert or tri count of a poly object in XSI? And more generally, is there any documentation for the XSI python API? I can figure out how to modify stuff via the listener (which is pretty good), I cannot for the life of me figure out how to query things though or wrap my head around the API concepts. And because everything is in COM I cannot even find out what API object something refers to, for example. Help much appreciated.

Are you working with C++ API or script SDK?

You can find the docs here:
http://download.autodesk.com/global/docs/softimage2013/en_us/sdkguide/index.html

In python the call would look something like this (assuming you have your X3DObject):

myObj.ActivePrimitive.GetGeometry3 ().Points.Count ()
myObj.ActivePrimitive.GetGeometry3 ().Triangles.Count ()

In C++ it would be something similar:
myObj.GetActivePrimitive ().GetGeometry (0).GetPoints ().GetCount ()

Isnt it GetGeometry2(0)? Or is GetGeometry3 new in 2013?
Python, Javascript, VB all have the same commands(XSI Object Model).
obj.Type helps alot. Printing out the FullName(obj.FullName) sometimes is very useful, too.

If I recall correctly GetGeometry2 was created to work nicely with JScript and GetGeometry3 was created to work nicely with Python.
For VBScript you would use the original GetGeometry.

At least in 2012 you would use Primitive.Geometry for Javascript/VB and Primitive.GetGeometry2(0) for Python cause Primitive.Geometry has output arguments. GetGeometry and GetGeometry3 dont exist in 2012.

[quote=““XSI Docs””]
Since Python does not support input parameters on properties, the Primitive.Geometry property will fail in Python.
[/quote]

You’re right it looks like it’s new in 2013:

Note: This method could return an invalid object in python, use Primitive.GetGeometry3 instead.