[Closed] xrefs.getXRefFileCount() not working?
I am probably making a very stupid mistake but I have this problem:
I am trying to list all the xref objects in my scene in order to process them later.
My scene has 10 xref objects, one of the has 2 sub-xrefs
WHen I run this, it gives as result 0, as if there were no xrefs in my scene…
print (xrefs.getXRefFileCount())
I have no clue what I am doing wrong
Object Xrefs and Scene Xrefs are two pair of shoes
If you use Object Xrefs ( as you mention in your post ), you should use the respective commands/data structs which is objXRefMgr in that case
objXRefMgr.recordCount
The above reports the count of objXref records ( individual files )
Once you got that you have to check each file record for the number of object xrefs .
See docs here
<DWORD><IXRefRecord MixinInterface>.ItemCount <&enum array>types
types enums: {#XRefObjectType|#XRefMaterialType|#XRefAtmospheric Type|#XRefAllType}
types is In parameter