Does anyone know how to add item(s) to collections with PML as opposed to std E3D menus ?
Thanks
Does anyone know how to add item(s) to collections with PML as opposed to std E3D menus ?
Thanks
IMPORT 'MyDataAddin' handle any endhandle USING NAMESPACE 'Aveva.Core.Presentation.MyDataAddin' !mydata = object pmlmydata() !mydata.ADDELEMENTTOCOLLECTION('/Element','New Collection1')
Thanks for that !
What about setting a certain collection as current ?
Thanks
Do you mean:
You have Collection1 with 4 elements in it and want these 4 selected in 3D and thus appear in the 'Current Selection'-collection?
In the collections dialogue box the current collection has an asterisk next to it, so whatever you do with collections it will be acting on that collection.
So I guess yes, selecting the items in that collection
Ok, something like this
IMPORT 'MyDataAddin' handle any endhandle !collectionName = 'New Collection3' USING NAMESPACE 'Aveva.Core.Presentation.MyDataAddin' !collectionsPml = object CollectionsManagerPML() do !key values !collectionsPml.GetCollectionsKeys() !name = !collectionsPml.GetCollectionName(!key) if !name.eqNoCase(!collectionName) then !collectionsPml.CURRENTCOLLECTION(!key) break endif enddo
Thanks for your help