  | | | Scripting : how to move samples from a polygon selection ? | Scripting : how to move samples from a polygon selection ? 2005-05-11 - By Javier
Back Guillaume first of all 'InvertSelection' does not return a collection so thats why your 'count' fails.
one method off the top of my head that you could use to create a subcomponent collection for polys not belonging to your cluster would be
oSel = selection(0) var matte = oSel.ActivePrimitive.Geometry.Clusters("matte") var polys = oSel.ActivePrimitive.Geometry.Polygons var matelems = matte.Elements var xpolys = new ActiveXObject("XSI.Collection") xpolys.additems(polys) //logmessage (xpolys.count) for (i=matelems.count-1 (See http://unt-1.ora-code.com);i>=0;i--){ logmessage(matelems(i)) xpolys.remove(xpolys(matelems(i))) } //logmessage (xpolys.count); //selectobj(xpolys) //xpolys contains all the polys that are not part of the cluster
i hope this helps, im sure that you could get at the polys somehow else, but this should work javier
--- Unsubscribe? Mail Majordomo@(protected) with the following text in body: unsubscribe xsi
|
|
 |