You can iterate through the subcomponent collection provided in the previous example and call the '.Index' property of each subcomponent item, or you can call the 'IndexArray' property of the subcomponent collection as shown below:
var oItem = Selection(0); if ( oItem.IsClassOf( siCollectionItemID ) ) { // subcomponent reference var oObject = oItem.SubComponent.Parent3DObject; var oSubComponents = oItem.SubComponent.ComponentCollection; var aSubComponentIndices = ( oSubComponents.IndexArray ).toArray() ; LogMessage( "SubComponent Indices: " + aSubComponentIndices ); } From: softimage-boun...@listproc.autodesk.com [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Avinash Sunnasy Sent: Friday, January 10, 2014 3:51 PM To: softimage@listproc.autodesk.com Subject: RE: How to get a primitive (polymsh) from subcomponent (pntSubComponent) Hello again, Do you know how to get a list of points from a: polySubComponent edgeSubComponent Thanks, From: Avinash Sunnasy [mailto:sa.69...@konami.com] Sent: Friday, January 10, 2014 11:50 AM To: 'softimage@listproc.autodesk.com' Subject: RE: How to get a primitive (polymsh) from subcomponent (pntSubComponent) Thanks Matt. From: softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com> [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Matt Lind Sent: Friday, January 10, 2014 11:47 AM To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com> Subject: RE: How to get a primitive (polymsh) from subcomponent (pntSubComponent) var oItem = Selection(0); If ( oItem.IsClassOf( siCollectionItemID ) ) { // subcomponent reference var oObject = oItem.SubComponent.Parent3DObject; var oSubComponents = oItem.SubComponent.ComponentCollection; } From: softimage-boun...@listproc.autodesk.com<mailto:softimage-boun...@listproc.autodesk.com> [mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Avinash Sunnasy Sent: Friday, January 10, 2014 11:45 AM To: softimage@listproc.autodesk.com<mailto:softimage@listproc.autodesk.com> Subject: How to get a primitive (polymsh) from subcomponent (pntSubComponent) Hi, If the current selection in the viewport is a point e.g. "cube1.pnt[6]" (CollectionItem) how do I get the primitive e.g. "cube" as X3DObject? Hopefully this is an easy problem to solve. :) Thanks, Avinash.