You can populate an XSICollection using the Items property with any object available in XSI. Any string that works in the text Selection field will work for your collection. If the items exist, the collection count will be greater than 0. Here's a quick code snippet:
// Populate an empty collection using string wildcard
var findColl = new ActiveXObject('XSI.Collection');
findColl.Items = '*.LensControls';
var lensProp = findColl(0);
//
Of course, the Collection may find more than one object that matches, or none at all. It's up to you to test it.
-Brad
-------Original Message-------
Hi there:
After creating a CustomPset, I would like to see if it was created. Using Find, I am not getting thecorrect answer. Could someone let me know what I am doing wrong
//script
var oCustomProperty =Application.ActiveProject.ActiveScene.Root.AddProperty("CustomProperty",0,"LensControls") ;
oEnum = newEnumerator(Application.ActiveProject.ActiveScene.Root.Properties );
for(;!oEnum.atEnd();oEnum.moveNext()) {
logmessage(oEnum.item().fullname);
}
var oPSet =Application.ActiveProject.ActiveScene.Root.Properties.Find("LensControls");
if (oPSet == null){
logmessage("No");
}else{
logmessage ("yes");
}
Thanks
Biju
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi