v4.0
Returns a ProjectItemCollection containing ProjectItem objects including not only the owners that contain it but all the objects in the scene that are influenced by it.
// get accessor Object rtn = Material.UsedBy; |
NewScene , false set Scene = Application.ActiveProject.ActiveScene set MatLib = Scene.ActiveMaterialLibrary set MyMaterial = MatLib.CreateMaterial( "Phong", "MyPhong" ) set SceneRoot = Scene.Root set MyGrid = SceneRoot.AddGeometry("Grid","MeshSurface") set MySphere = SceneRoot.AddGeometry("Sphere","MeshSurface") SIAssignMaterial MyGrid, MyMaterial SIAssignMaterial MySphere, MyMaterial Application.LogMessage "Object is Used by : " for each oOwner in MyMaterial.UsedBy Application.LogMessage oOwner.Name next ' This example should log something like: ' INFO : Object is Used by : ' INFO : grid ' INFO : sphere |